You are using the wrong syntax, that's all.

for (var btn in btnClipArray) {
        btnClipArray[btn].removeMovieClip();
}

btn is simply referring to the index in the array, not the object in
that array's position.  If you traced btn you'd get a number counting
down from the length - 1 of the array to zero (10 9 8 7 6, etc.) because
for in iterates backwards through an array.

For that loop, though, I'd use the fastest loop in Flash:

var i = btnClipArray.length;
while (--i -(-1)) {
        btnClipArray[i].removeMovieClip();
}


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to