Hi,
I have splash.swf which loads up at the beginning of my site and also plays
when other pages are loading up. (So when the user presses a button for a page,
splash.swf also appears and plays and then is told to dissappear when each page
starts to play.)
I want to load a random animation within a movie clip on splash.swf which can
be done with this simple attached code.
However, I just want a random animation at the beginning of site load, not at
each playing of splash.swf.
Master.swf (_root) loads up splash.swf but at that stage the movieclip doesn't
exist yet for me to target it.
Not sure how to tell a random animation to load into splash.swf only when the
splash.swf is run for the first time (at site start) and not at each subsequent
use. I keep thinking of the word Array - don't know why because I don't ever
use them and not sure what they are really used for. Is this doable please. My
code to at least load in a random movie (which works fine if indeed i did want
a random movie at each play of the swf) is attached. Maybe there is a way i can
randomly load an animation into a library and then just target that animation.
Please enlighted my logic. Cheers for any advice dudes/ladies.
filename = ["warp.swf", "warp2.swf", "warp3.swf"];
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(filename[k], movieTarget);