No, because it's a for (x in a) loop, not a for (x; y; z) loop. In AS2
it iterates backwards over the elements. Not sure about AS3, but it
should work there, too. Try it and see!

On 12/21/06, Andy Herrman <[EMAIL PROTECTED]> wrote:
Wouldn't doing the splice there change the indexes of everything else
in the array and mess up the loop?

For instance:

[1, 2, A, A, 5, A, 7]

say you're deleting the As.

The first time you do a splice you remove the first one, and get:

[1, 2, A, 5, A, 7]

The index of everything after the first A has now changed.  The second
one is now at index 3, but you already handled index 3 in the for
loop.  Is the for-in loop smart enough to run index 3 again, since the
value there is new?
_______________________________________________
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