AS Coders
AS Coders
Out of context: Reply #9
- Started
- Last post
- 16 Responses
- caseyc0
Here's a short list of things I noticed at first glance and how I deal with them. Note I mostly code is AS1 so these tips are geared to that.
1. Code on different frames/timelines
I keep everything external, I use .as files and have one clip in my lib that has export for as checked and contains all of my includes inbetween an #initclip #endinitclip block
2. XML Looping
I never use childNodes, a long time ago I learned this loop which is much much faster and leaner:
var child = anyxml.firstChild;
do {
// parse child
} while((child = child.nextSibling) != null);3. Code looping
Always use do, while, or for...in
loops, the i=0;l