Category:IT/Web/Programming > Flash & Interactive
ID:3271
Title:FGS Randomiser
Location:Anywhere
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);
}
Type:Fixed Price
Budget:Up to £100 (Approx Up to $157)
Attached Files: None
Bidding ends:Bidding Closed
Job Posted:30/07/2008 19:28
Bids:1
Who has Bid:
AnonymousStay safe: Read our safety guidelines before bidding
Bidding has ended for this project, the client has accepted the bid(s) below:
Accepted Bid #1Amount: $55 Fixed Fee
Country of Freelancer:
United Kingdom
Estimated Start Date: Within 1 Business Day
If you are in doubt of the legitimacy of a Job and or Client, let us know by Reporting the Job.
For further support on preventing and reporting fraud please contact the UK’s National fraud reporting centre at http://www.actionfraud.org.uk/ or outside the UK Fraud Watchers at {fraudWatchers}