Flash - Connection between stage and code

Started by
0 comments, last by Dekasa 14 years, 1 month ago
Ok. I've been programming (a little) for years, and I've used several languages, my favorites being C# and Ruby. I figured with all my programming knowledge and my gaming interests I'd make a game for the purpose of actually making a game. I've made tetris, and card games, all those simple little things that you start with, but actually make a game to actually play. And so I decided flash would be an excellent language to do so, for relatively obvious reasons (I'm told its simple/easy to use, there are a million flash tutorials/games/source etc.) I have one, really stupid problem that I just can't find the answer to. What/where is my correlation between when I put things on my stage, and the code/actionscript that goes with them? I remember in Visual basic and in the C# IDE I could make a button, or put something on a form, then double-click it to get to its code so I could modify from there. Like a button, I could write its onClick function, any properties it needed, etc. I haven't found that in flash. So my question really is: What/where is the connection between flash code and flash objects on the stage. I can write the code of something, and I can make an object on the stage. How do I take my code and make it on the stage? I know its probably somewhere stupid, but I can't find it/figure it out for the life of me.
Advertisement
Ok, I actually found this (more or less), but one thing I still can't do is make an object that I have a .as file for. Like, I made an object inside a script file, but how do I get that onto the stage. When I put code in the actions of layer1 (on the timeline) it says it can't find it.

This topic is closed to new replies.

Advertisement