Welcome to WebmasterWorld Guest from 54.158.35.222

Forum Moderators: open

Message Too Old, No Replies

[F8] Random load movie INTO existing

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

5+ Year Member



Hi,

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
_global.getRandomFile=function(oldFile){
do { var newFile = fileNames[Math.round(Math.random()*(fileNames.length-1))]; }
while (oldFile==newFile);
return newFile;
}
_global.loadRandomFile=function(){
_global.fileToLoad = getRandomFile(_global.fileToLoad);
loadMovieNum(fileToLoad,0);
}

... 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)

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



Did you figure this one out yet?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month