homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

[F8] Random load movie INTO existing

5+ Year Member

Msg#: 3711018 posted 9:45 am on Jul 30, 2008 (gmt 0)


I need to load a randomly selected .swf into my main movie. Have found the code below which does all the loading fine...

// all variables are global so they will be available
// as we load new swfs into level 0...
_global.fileNames = ["home_bot_alex.swf","home_bot_jackson.swf","home_b ot_rob_gym.swf","home_bot_rob_webber.swf","home_bo t_ross.swf","home_bot_simon.swf"];
//get random file while checking against the last one
do { var newFile = fileNames[Math.round(Math.random()*(fileNames.length-1))]; }
while (oldFile==newFile);
return newFile;
_global.fileToLoad = getRandomFile(_global.fileToLoad);

... however, I need to keep elements from the original, so is there a way to load the new movie INTO the main one?

I think I might need to load into an empty instance? If so, what does my code need to look like?

Thanks in advance



WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member

Msg#: 3711018 posted 2:13 pm on Aug 8, 2008 (gmt 0)

Did you figure this one out yet?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved