actionscript 3 - AS3 - Preventing duplicates from being selected from an array -


this question has answer here:

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:

http://bost.ocks.org/mike/shuffle/


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -