Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : Random Flash Movie on reload


Benno
2/11/2004 11:34:12 PM
Hi all
Have searched for this topic and did not get the answer i was looking for

So... if i have a three movieclips, how do I randomly generate them on a
refresh
ie. on each refresh it plays a different movie clip

Im thinking it would be better to ramdomly select them from the loadvars action
Would this not then save them from all being loaded at the start. Only one
gets loaded at a time to save on download time

Any help would be appreciated
Regards
kglad
2/11/2004 11:40:48 PM
close. if your 3 movieclips are swf1.swf,swf2.swf and swf3.swf you can use the
following in your main movie (soon to be replaced by one of the 3 above)
loadMovieNum("swf"+Math.ceil(3*Math.random())+".swf",0)
Benno
2/11/2004 11:48:19 PM
If that is all there is to it, im almost embarssed to have asked.
kglad
2/12/2004 2:44:02 PM
AddThis Social Bookmark Button