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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go to doesn't work 1

Status
Not open for further replies.

Micher

Technical User
May 18, 2001
9
CH
Hi
I've placed a button in a movie (called "mvMenu") that is iserted into scene 1. By playing the movie and then clicking the button one should get to scene 2, but that doesn't work. I was trying a simple
Code:
on (release) {
    gotoAndPlay ("Scene 2", 1);
}
command, but when clicking, I stay at ("Scene 1", 1). What am I doing wrong?

Tanks for your help!
 
Can you post your fla anywhere or mail it to ohsoyoudontwantanychipsthen@hotmail.com and I'll have a look.
 
Again! Again! And Again!
Targeting another scene from a movie clip, or from a loaded movie on another level, you cannot use the standard gotoAndPlay(); action, because the main timeline is seen as one big scene even if it holds several of them.

You either have to target a cumulative number of frames, or use a frame label.
Thus, if you want to target frame 1 of Scene 2, and your Scene one holds 100 frames, you would use (100 + 1)= 101:

on(press){
_root.gotoAndPlay(101);
}

The problem with that method is that if you edit scenes (shorten them for example...), you'll have to re-calculate all of your targeted frames from all your buttons.
It is thus much better, to use labeled frames as targets.
Labels stay attached to particular frames, and unless you delete them, allways will so removing frames from previous scenes wouldn't affect them.
Labeling frame 1 of Scene 2 in the above, with start2
for example, you would then use:

on(press){
_root.gotoAndPlay("start2");
}

Both methods can also be used from loaded movies on other levels, but you would then replace _root by _level0:

on(press){
_level0.gotoAndPlay("start2");
}

Regards,
wink4.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top