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

can't get button inside movie clip to open new scene

Status
Not open for further replies.

coolasafanman

Technical User
Nov 25, 2001
1
US
I'm trying to set up my menubar as a movie clip that I can place on each of the 5 pages of my site. It contains animations that go off whenever a button is pressed, and is supposed to be followed by opening the appropriate page. Upon button press, the animation runs, but the scene does not change. help?!?!?!

within my menubar movie clip, each button has similar code to this...

on (release) {
gotoAndPlay ("go_product");
}

go_product is a label for the animation within the movie clip. At the end of the animation sequence I have:

gotoAndPlay ("product_scene", 1);

where product_scene is the scene i want to open. thanks folks...
 
Must I understand you're targeting the main timeline from within the mc?

If so you should refer to it (from within the mc) as:

_root.gotoAndPlay(x);

Or...

_root.gotoAndPlay("labeled_frame");

When targeting the main timeline, from within a mc or a loaded movie on another level, the mc or the loaded movie see the main movie as one big scene, even if it holds several. You thus have to target a cumulative frame number ("x" abobe) or a labeled frame.

If you targeting frame 1 of Scene 3, and your Scene 1 holds 100 frames, and your Scene 2 holds 50 frames, you would use:

_root.gotoAndPlay(151); // 100 + 50 + 1 = 151

But it's easier and more accurate (if you add or substract frames from your scenes, you'll have to re-calculate the target!) to use a unique frame label and to target that label as:

_root.gotoAndPlay("labeled_frame");


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

Part and Inventory Search

Sponsor

Back
Top