Not really a flash question as such... I have found a few image rotators on the net... however i'm looking for a way to rotate flash files so when you load the screen once one flash movie appears... when you reload the page another flash movie is loaded instead of the previous one.
You make a flash movie at the same size as the movies you want to randomly load into it. Put an empty movie clip in the top left corner and name it mtClip. Name all the swf files you want to load, in sequence. Then add this code to the first frame of the actions layer:
Code:
randomClips = new Array ("background0.swf", "background1.swf", "background2.swf", "background3.swf");
function randomBackground() {
randomNumber = random (randomClips.length);
_root.mtClip.loadMovie (randomClips[randomNumber]);
}
randomBackground();
The more movies in the array, the more random it will be.
It's not that hard to do. Here's a fla, but your going to have to supply your own movies to load, named for the names in the array, or change those names.
I've been trying the process outlined in this thread by Geezer to rotate flash files upon a reload of the browser window.
Initially, I had just one flash image in the page (located at http://wildrivernet.com/_fw/index2.htm ). This worked exactly as planned (although the SWF image now needs to be a wee bit larger due to some changes in the navbar). The page was created through the template process in Dreamweaver, but I did not experience any problems implementing the flash component.
The client would like rotating flash images upon a user refreshing the browser (i.e. a different flash file play). I worked on this for four or five hours and made no progress, as the flash files would simply not play. After taking a walk, I decided to "detach" the page from the template and this seemed to have helped somewhat. The SWF files auto play and do rotate with a browser refresh. The issue NOW is that the SWF files play very fast and continue to loop, eventhough the original FLA files are non-looping. You can see this occur at http://wildrivernet.com/_fw/index.htm.
Can you tell me what I might have done wrong? I'm about ready to rip my hair out over this and I'm sure it's something stupid.
Make sure the swf's that load are made at the same frames per second as the main movie that loads them. It also looks like you did not put a stop in the last frame of the animated swf's.