yeh - i started trying to do that but just got myself into a moody bluddle - i'll prolly go back and try to rewrite it a bit cleaner when i'm happy i'll hit deadline

here's what i ended up with -

                        var myTempArray:Array = [];
                        designerArray.sort();
                        for (var i:Number = 0; i < designerArray.length; i++) {
                                if (designerArray[i] != designerArray[i-1]) {
                                        
myTempArray.push(designerArray.slice(i,i+1));
                                }
                        }
                        designerArray = myTempArray;

thanks for the tips guys



On 22 May 2007, at 18:13, Rákos Attila wrote:


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

_______________________________________________
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