I was wondering if you think it’s a good idea to try and write as much of the code for something using actionscript in the root. Also is it better to try and make actionscript programmes only one frame long because i thought i heard that somewhere but lots of tutorials show you how to do things using several frames. thanks.
Hi law,
I am not sure what constitutes “good coding practice”. I think it is a matter of preference and ability.
Putting all code on frame 1 of a movie will certainly make it easier to edit.
I prefer to keep my code on the first frame of an mc (as opposed to the main time line) where possible.
Trying to make a movie one frame long is a OK for a simple animation, however for more complex movies you will need to provide loops and therefore will need more than one frame.
So, as I said it is really a mixture of need, preference and ability.
Don’t know if that helps at all, would love to hear others opinions as well
Cheers
SteveD
It all depends on what your script is for, if you need multiple script executions and are using Flash 5. If you need a script executed more than once and you have Flash MX than this can be done, but if you are using Flash 5 then you will need at least an embedded movie clip or another frame to make a timeline loop. Though if you check out site like www.bit-101.com you will see that most of his movies made with Flash MX contain just one frame and no real-time made movie clips. I hope my summary kind of helped, if not reply back and I will try not to be so broad.