jleonard wrote:
Appreciate the heads up. So I thought that placing as code externally was the "more correct" way to do it. Is this not true? Or is there another way it's done?
To be more specific about what Hans said, you can't put random statements into a standalone AS2 file. You can still put any code into an external file though, and this is often a better way to manage your projects. Say you've got some code in the timeline of your movie: just cut out that code, put it in an AS file and replace the code in the timeline with a #include statement.
This is exactly the same as writing your code directly in the timeline, but it means if you want to put exactly the same code in two different movies, they can both use the same include - just be careful when you do this that all files using the same include really do want the exact same code! The advantage is that if you want to make a change later, you only need to edit one file. But the flipside of that is if you didn't really want that change in one of your movies, you'll have a problem.
Doing this can also make your code easier to find, and it makes it possible to work with a version control system, but it can also make your projects more interdependent, which can cause problems.
Ideally, put all your heavyweight scripts into AS2 classes and put simple "business logic" statements directly into your timeline or in external include files, depending on what you feel is appropriate for your own needs.
- Robert _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

