PDA

View Full Version : How to randomize to play a mc in flash 4?


coala
09-23-2002, 01:14 PM
Hi,
I would like to start my fla movie with a introscene, before entering the main movie.

In that introscene I have 4 mc's and want flash to randomize to play one of them, before continuing.

Anyone knows how to do this in old flash 4 please? I would be so greatful :D

Thanks,

C.

20 Ton Squirrel
09-25-2002, 02:43 PM
*yawns and stretches*

Alright, you poor soul... forced to deal with F4. May the light of MX shine upon thee soon. Until then, I shall aide!

Now... lemme think here... gotta remember how this is done. Slap your four MC instances on the stage. Put a stop action in the first frame of each, by the way. Name the MC instances like this:

mov_1
mov_2
mov_3
mov_4

In the first frame of your timeline have this code...

int_random = random(4);
tellTarget("mov_" + int_random) {
play();
}



That should do the trick. It's been a while, though, so lemme know if it doesn't. Good luck, happy coding, and for the love of all that's holy get MX. You won't be sorry. *grin*