Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
09-22-2009, 05:48 PM #1
- Join Date
- Mar 2006
- Thanked 2 Times in 2 Posts
loading random movie clip in a loop
I'm looking to load a random movie clip, but to play one after the other, so once one finishes I want to load another one.
I have this so far:
var myMovieSequence = 2; // Creates the random number: var myRandomNumber = Math.floor(Math.random()*myMovieSequence)+1; // Creates the full Flash Movie name like: 1.swf var myMovieName = myRandomNumber + ".swf"; // Loads the random Flash Movie: loadMovieNum(myMovieName, 0);
This code is in frame 1 of the timeline, so I've tried adding things like gotoAndPlay(1); to reload the frame but with no luck.
I'm guessing I need to somehow add a loop, but I don't know how to make it reload frame 1 - I'm completely new to flash!!
Really appreciate your help.