Is there a way to be sure that random return you all possible value within a range.
for example random(10) will return me : 1,5,7,8,5,7,9,4,3,4 or whatever.
I want that random return me only once a number…so if i loop 10 times I will get 10 differents number from 0 to 9.
i=0;
while (i<10)
{
x = random (10);
trace(x);
i++;
}
while return for example : 1,5,4,6,2,3,9,8,7,0 and not 1,2,4,3,2,4,5,7,8,7
For sure I can find an algorithm to do this but if there is an action script’s function it should be better…
…any tricks?
The scope is to use random with setInterval for special masking effect…
Kirupa IS A Very good, efficient site for flash…thanks to all of you…:)…it has really help me so many times.