Don't you think that you should take into consideration that the
length of the array can change during the loop?

  Attila

ABER> //loop through items, removing any sitting next to a duplicate
ABER> for (var i:Number = 0; i < myArray.length; i++) {
ABER>   if (myArray[i] == myArray[i+1]) {
ABER>           myArray.splice (i, 1);
ABER>   }
ABER> }


_______________________________________________
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