Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing 5 swf movies from button activated to continuous

Status
Not open for further replies.

alan137

Programmer
Jul 25, 2002
14
0
0
AU
I have a script written by a programmer who is no longer around. It is a menu with 5 movies. Each movie runs when the appropriate button is pressed. I now need to get the five movies to run in sequence (without returning to the menu)and then start again from movie 1.

Can anyone help with the code?

Thanks

Alan
 
Thanks for hetting back to me.

At the moment it is a button driven presentation. The script on the first fram of the mainMenu movie is as follows.


#include "presentationScripts.as"
myController._visible = false;

mainMenu.button1.onPress = function(){
loadMovieToTarget("Movie_1.swf", _root.movieTarget);
showMenu(false);
}
mainMenu.button2.onPress = function(){
loadMovieToTarget("Movie_2.swf", _root.movieTarget);
showMenu(false);
}

mainMenu.button3.onPress = function(){
loadMovieToTarget("Movie_3.swf", _root.movieTarget);
showMenu(false);
}

mainMenu.button4.onPress = function(){
loadMovieToTarget("Movie_4.swf", _root.movieTarget);
showMenu(false);
}

mainMenu.button5.onPress = function(){
loadMovieToTarget("Movie_5.swf", _root.movieTarget);
showMenu(false);
}
backToMainMenu.onPress = function(){
showMenu(true);
}

Following is this is the "presentationScripts.as"

function loadMovieToTarget(movieLoc, target)
{
target.loadMovie( movieLoc );
myController._visible = true;

this.onEnterFrame = function()
{
if(target.getBytesLoaded()>4){
if(myController.movieTarget == undefined)
{
myController.setMovie(target, true)
}

if( (target._totalframes-2) < target._currentframe){
this.onEnterFrame = undefined;
showMenu(true);
myController._visible = false;
myController.movieTarget= undefined;
target.unloadMovie();
}
}
}

}

function showMenu(flag)
{
mainMenu._visible = flag
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top