PDA

View Full Version : Problem with LoadMovieNum



Bruce
February 27th, 2005, 05:53 AM
Hi all,

I have 2 swf movies: "Title swf" and "Intro swf".

From the Title page the user clicks on a button to go to the Intro page. A return button then takes the user back to the Title page before proceeding. What I am trying to do is ,on return, to go to the last frame (135) of the Title page movie, and skip out the preceeding frames which the user has already seen.

I have tried both the following scripts but 'on returning' to the Title page it still goes to frame 1. What am I doing wrong?

on (release) {
loadMovieNum("Title.swf", 135);
}

__________________________________

on (release) {
loadMovieNum("Title.swf", 0);
}
gotoAndPlay(135);


Thanks

40Unregistered
February 28th, 2005, 01:37 AM
the "135" in this script means level, not frame

on (release) {
loadMovieNum("Title.swf", 135);
}

if u are still in "Title page", u only do this:

on (release) {
gotoAndPlay(135);
}

Bruce
February 28th, 2005, 04:49 AM
Thanks for clarifying the the level/frame no. in my first script.

yes the 2nd script does work if I am in the "Title page", but I want to go directly from the "Intro. page" to frame 135 of the "Title page".

The script below shows what I am trying to achieve but some small problem with the syntax.

on (release) {
loadMovieNum("Title.swf", 0);
}
gotoAndPlay(135);

Thanks again

40Unregistered
February 28th, 2005, 08:17 AM
okay...
is it matter if u change loadMovie to target than to level?
create empty mc named "target"
give a variable ("wheretoGo"), so loaded movie will check this variable, If its true, then the movie will jump to frame 135.

on(release){
target.loadMovie("title.swf");
_root.wheretoGo = "goto135";
gotoAndStop(2); //notes
}


notes: only if u want button gone when movie loaded. in the frame 2, button is set invisible or deleted. dont forget to put stop(); in 1st n 2nd frame


AS in the 1st frame of "title.swf":

stop();
if(_root.wheretoGo == "goto135"){
gotoAndStop(135);//movie will skip frames and go directly to frame 135
} else {
gotoAndPlay(2); //if its false, movie will play normally from frame 2
}

this script is from a guy in sitepoint forum n has been modified

Bruce
March 1st, 2005, 07:27 AM
You're a star! - Thanks for the help & explanations.

webmaniac
March 10th, 2005, 12:15 PM
Bruce,hi,
in the second script you include the "go to frame 135 "within the bracket of load movie command and try,
all the best