How do you make the screen go to a random frame that is inside a movie clip?
Howdy…
Create a random number and store it to the variable…
Use _level0.yourMC.gotoAndPlay(yourRandomVariable) or _level0.yourMC.gotoAndStop(yourRandomVariable) to do the job…
Easy, eh???
tip.
[url=http://www.kirupaforum.com/search.php?s=]
onClipEvent(event you want) {
this. gotoAndPlay(1+Math.round(Math.random()*random number));
}
Originally posted by fluid_0ne
onClipEvent(event you want) {
this. gotoAndPlay(1+Math.round(Math.random()*random number));
}
onClipEvent (event you want) {
this.gotoAndPlay(Math.ceil(Math.random()*this._totalframes));
}
[size=1]edit. typo !![/size]
yeah, i knew it all tha time ;P:cowboy:
then why would you use 1+Math.round() ??
i was in such a hurry, U would never guess
interesting … :sigh:
ok, 4 real i wasn’t thinking what i’m writing… i just wrote what i though :+)