PDA

View Full Version : play random frames in MC :: how?


everlite1knight
11-25-2003, 08:17 AM
Hi.

Just looking for someone to give me a quick answer to the following simple question (for everone except me 8-)


This is what i have,
three buttons. each one leads to a promotional page/frame.

when open on one of the three frames i have another MC (one for each of the three original pages) and this MC holds a simple loop of three images.

now my problem is this. when the user clicks on the page and these three image loops appear i need them to randomly appear. ie, one time it might start with a picture of the first product while another time it may begin with the third product - randomly playing the keyframes in the MC.

I'm sure this is quite simple but i really don't have a clue.

Any help or direction on how to get the random loop would be much appreciated.

cheers ~ Dave.

junahu
11-25-2003, 09:16 AM
MyVar = Math.ceil(Math.random()*3)

gotoAndStop(MyVar)


Is this what you wanted?