PDA

View Full Version : random



blake
11-27-2003, 09:35 AM
Hey
i use this code on frame 1 to random play a frame


gotoAndPlay(random(8));


and that will play a frame between 1-8, but if i have this say on frame 50 it will just random frame 1-8 ... how can i get it to play random 50 - 58 ?

thanks in advance, blake

jeet
11-28-2003, 04:56 AM
hi Blake,


below is the code to genrate to random value and trace also the value !


gotoAndPlay(50+random(8));
abc = 50+random(8);
trace(abc);

Regards
jeet

blake
11-28-2003, 09:21 PM
Thanks man, ill try it out,
im not sure what the trace thing is for thoug :S or what to put in place of abc!

cheers, Blake

jeet
11-29-2003, 04:46 AM
hi there,


sorry i think i confuse... you


abc is just a variable to trace the value of frame!

use the below code only!



gotoAndPlay(50+random(8));


regards
jeet :)

blake
11-29-2003, 10:08 AM
yeah, you did confuse me :P

thanks, Blake