PDA

View Full Version : random scenes



luksy
January 3rd, 2003, 08:14 PM
When the movie loads, it takes you to a random scene. How?

Thanks.

andr.in
January 4th, 2003, 12:25 PM
This actionscript on the first frame:

//write down all the scenes
scenes = ["scene1", "scene2", "scene3"];
//picks a random scene from the previous array
nextscene = scenes[Math.floor(Math.random()*scenes.length)];
//Goes to that scene
gotoAndPlay(nextscene);

:ninja:

luksy
January 4th, 2003, 03:46 PM
thanx!