-
Organizing Your ActionScript
I have been working on very large fla file that has become quite complex. I have many movie clips that contain several other movie clips and instances nested inside, which also have many more movie clips and instances nested inside them(but it actually goes much deeper). Most of these movie clips have very large timelines with lots of ActionScript. In short, the file has become very difficult to manage and it isn't even finished. So, would it be considered bad practice to place all of my ActionScript on the main timeline in frame 1 of an actions layer and just call the pathnames of movie clips and instances throughout the file?
-
Senior Member
For me, this is the way I do it, and I guess this is the best way, since you can manage all your scripts in one place.....
-
Senior Member
It is definitely not a bad practice to place all your scripts in either frame 1 or a frame following the preloader.
That's how I always do it. Otherwise, you're asking for grief.
No less an authority than Colin Moock also recommends this method.
-
Perfect. Thats exactly what I needed to hear. My life is much easier now... Thanks guys
-
If you start writing using OOP, it can cut down on the amount of code in everything. It's amazing how much you can do with MovieClip.prototype.nameYourFunction = function(variable1,variable2){
} and then combining this with some onEnterFrame functions. Just make sure you delete your oef's.
-
I've dabbled in OOP with ActionScript, but I'm just getting to where I have a grip on AS 2.0. I have a book relating to OOP with ActionScript but, I don't really have time to read 500 pages at the moment, so if you know of a good tutorial explaining some of the more useful tricks--that'd be great.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|