A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Rotating Flash Movies?

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Location
    Leeds
    Posts
    6

    Rotating Flash Movies?

    Hey there,

    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.

    Anyone got any ideas how to do this?

    Cheers

    Jason

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    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.

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Location
    Leeds
    Posts
    6
    Hi there...

    Thanks for the info... not so hot as you must be with Flash.

    Would there be any chance you could send a FLA file with that already done...

    My email is jason@bent.com if you wouldnt mind mate?

    Cheers Jason

  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    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.
    Attached Files Attached Files

  5. #5
    Junior Member
    Join Date
    Sep 2007
    Posts
    1

    Rotating Flash Movie - Still Have Problems

    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.

    Thanks for any help anyone can provide.

  6. #6
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center