This content has been marked as final. Show 7 replies
decrease your interval frequency, use updateAfterEvent() in createPalette() and most importantly create two arrays: one containing the possible values of your randomx values and the other of your randomy values. use the shuffle function (check this forum) to randomize those arrays and then use those arrays so you don't attach movieclips on duplicate positions.
oops. you need one array with all x,y positions of myBitmap.
thanks for this advice!
where does updateAfterEvent() have to come? and how do i create this two arrays?
updateAfterEvent() should be placed at the end of createPalette() and use one array with all positions:
wow, thank you so much! ...i'll check it
my child is bugging me, i'll check it tonight.
my next question will probabely be, where to integrate the "a" value in my old createPalette remainder.
thank you again
you don't use "a". that's the function argument. you just pass your array to shuffle() and then you access bmpA's elements from 0 to bmpA.length-1:
when the last array element is reached, clear your interval.