Flash 8 Best Practices on Developer Center

The Flash 8 Best Practices document has been posted on the Developer Center. This is an updated version of the Flash MX 2004 Best Practices document that was out there, but doesn’t contain the ActionScript stuff (which is here instead: http://www.macromedia.com/devnet/flash/articles/as_bestpractices.html).

Most of this can be found somewhere in the documentation, but it wasn’t consolodated into a single place. Hopefully it will be in the future 😉 But for now, it’s here on the Developer Center:

http://www.macromedia.com/devnet/flash/articles/flash8_bestpractices.html

Enjoy!

And if you have things to add (there are always best practices to add), let me know and we’ll consider everything for a future revision!

2 Responses to Flash 8 Best Practices on Developer Center

  1. PaulC says:

    Just stumbled on this tute in the Dev center and I had a quick question.You said:”Assign Array.length to a variable before a loop to use as its condition, rather than using myArr.length itself.”My question is, why? Wouldn’t it be more efficient to access the property directly rather than creating another variable to hold the same data?Thanks.

  2. Lee says:

    Not that PaulC is likely to check back after a month, but…More CPU cycles are required to inspect a member of an object than are required to inspect a local variable. So, while there’s additional bytecode and memory consumed to store the value of myArr.length in a local variable, there is a net performance gain when evaluating a local variable at the beginning of each iteration of a loop rather than evaluating the length property of an Array.