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

buttons in movieclips

Status
Not open for further replies.

silverswim

Programmer
Oct 17, 2001
50
GB
Hi,
I've put an 'exit' button in a movieclip on the root timeline, and i've given the button the script
on (release){
_root.gotoAndPlay("sceneName");
}

and scene is the name of the scene on the root timeline.

When I test run, the cursor changes to a hand over the button which is in the movieclip which is on the root timeline, but it wont go to the scene.
Could anyone tell me what is wrong with this setup?

Thanks in advance, silversim
 
Simply because you can't target scene names from movie clips or from external movies. Target a labeled frame instead. Label the targeted frame in the targeted scene with an unique label, add _level0 to your path and target the labeled frame...
Code:
on (release){
    _level0.gotoAndPlay("frame_label");
}
 
Hi, thanks oldnewbie,

this works now, and it works with
_root.gotoAndPlay("frame_label");
....I realize you can set any frames label on any scene in a timeline and they'll all be accessed as being on that same timeline. thanks again :)
 
In this case, _level0 and _root are exactly the same thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top