actionscript 3 - AS3 - Preventing duplicates from being selected from an array -
this question has answer here:
- randomize or shuffle array 2 answers
i've got array of 8 strings want place on stage (using textfields) in random order.
i can select 8 of strings without problem, using math.random pick number between 0-7 , placing item @ index onto stage.
but i'm struggling prevent duplicates being added. have suggestions?
thank you
shuffle array, loop through it. great examples can found here:
Comments
Post a Comment