Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

[F8] Random load movie INTO existing

9:45 am on Jul 30, 2008 (gmt 0)

New User

10+ Year Member

joined:Apr 18, 2006
posts: 14
votes: 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

2:13 pm on Aug 8, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
votes: 0

Did you figure this one out yet?