Forum Moderators: open
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