FGS Randomiser
5413
£100(approx. $125)
- Posted:
- Proposals: 1
- Remote
- #3271
- Archived
Description
Experience Level: Intermediate
Am using the script in a flash movie to load in a randomly selected .swf.
This works fine except that it completely reloads the movie with the new one, and i need to retain
some elements from the original, therefore need to load the new movie into the old one...
Can someone show me what I need to do?
// 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_bot_rob_gym.swf","home_bot_rob_webber.swf","home_bot_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);
}
This works fine except that it completely reloads the movie with the new one, and i need to retain
some elements from the original, therefore need to load the new movie into the old one...
Can someone show me what I need to do?
// 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_bot_rob_gym.swf","home_bot_rob_webber.swf","home_bot_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);
}

Richard W.
100% (8)Projects Completed
9
Freelancers worked with
9
Projects awarded
50%
Last project
26 Jun 2019
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies