View Full Version : problem with random
Freak
11-17-2002, 05:16 AM
i had a movie clip that waits 10 frames, then there´s a frame
withgotoAndPlay (random (14));
and for example:
frame 11:
gotoAndPlay ("15");
frame 12:
gotoAndPlay ("25");
but when i test it, this doesn´t work, it just waits the 10 frames, go to the frame 1, <- this repeats randomly, and then JUST go to the frame 11.
what is wrong?
oulalala..
Can you be more explicit or send a fla we can see?
Billy T
11-17-2002, 08:47 AM
gotoAndPlay ("25");
??
I presume 25 is a frame label? I don't think can have frame labels of just numbers like this...
Freak
11-17-2002, 07:10 PM
well, the frame number is 25 just for example, the frame 11 should go to frame 15 and plays an animation and ends at the frame 25, it goes to frame 1, plays the 10 frames and in the "random" its supposed to go to 11, or 12, or 13, or 14, if it goes to frame 12 it goes to frame 25 plays till frame 35 (...) but my problem is that plays the 10 frames, then it doesn´t go to the frame with "random", it goes to frame 1
farafiro
11-18-2002, 07:35 AM
here u go
//Frame10
gotoAndPlay(random(4)+11)
//Frame11
gotoAndPlay(15)
//Frame25
gotoAndPlay(1)
//Frame12
gotoAndPlay(26)
and so on
your pb was that not giving the random another fixed number to add it, coz it gets a random number starts from 0 and ends with the number u entered within the brackets Subtracted by one
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.