Malignus
05-19-2007, 07:50 PM
So, I tried using Macromedia's LiveDocs on basic AS 2.0 to create a really basic turn-based combat engine the other day. It completely failed. Part of the problem, I think, is that I don't quite understand how it works.
I know that you've got AS files in the same directory as the FLA, that you name the class each AS file creates the same thing as the file name, and that you stick a little bit of code in the FLA to create an instance of the class.
What I don't quite get is, what is happening when you create an instance of a class? Should you be trying to stick functions in your classes, or should you only be creating sets of variables that you then manipulate with functions inside the FLA? How do you match up these variables in a class instance with an actual movieclip you want to attach to the stage? This seems like it ought to be really obvious and basic, but unfortunately livedocs has failed utterly to properly teach this stuff to me. Maybe I'm just dense, and if so, I'll own up to that. But really, I'd just like a nice, comprehensive tutorial. Is there one somewhere?
I know that you've got AS files in the same directory as the FLA, that you name the class each AS file creates the same thing as the file name, and that you stick a little bit of code in the FLA to create an instance of the class.
What I don't quite get is, what is happening when you create an instance of a class? Should you be trying to stick functions in your classes, or should you only be creating sets of variables that you then manipulate with functions inside the FLA? How do you match up these variables in a class instance with an actual movieclip you want to attach to the stage? This seems like it ought to be really obvious and basic, but unfortunately livedocs has failed utterly to properly teach this stuff to me. Maybe I'm just dense, and if so, I'll own up to that. But really, I'd just like a nice, comprehensive tutorial. Is there one somewhere?