Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using actionscript to make movieclips play at random

0 views
Skip to first unread message

shallowdeep

unread,
Jan 24, 2008, 12:19:05 PM1/24/08
to
Hi,

I have created three layers in Flash all on one frame. One layer for
actionscript and the other two each have a movie clip. One called Gary_mc the
other Paul_mc. I plan to add other movie clips at a later date.

I want it, so whenever the swf file is loaded a random movie clip is played.
And once that clip is finished another movie clip is played afterwards again at
random.

I have attached my best efforts, however it is still not working.

Thanks for any help

clips = ["Paul_mc", "Gary_mc"]

randMC = clips.splice(random(clips.length),1);

if (clips.length){
randMC = clips.splice(random(clips.length),1);
}

kglad

unread,
Jan 24, 2008, 12:24:51 PM1/24/08
to
:

clips = ["Paul_mc", "Gary_mc"];

index=Math.floor(Math.random()*clips.length);
clips[index].play();
clips[1-index]._visible =false;

shallowdeep

unread,
Jan 25, 2008, 4:24:13 AM1/25/08
to
Hi,

Thanks for replying but this still isn't working. Is it because all the layers are on the first frame?

Do I but the script in every movieclip?

0 new messages