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!

Urgent Help! Can any one link a Button in a Clip to a scene! Please!

Status
Not open for further replies.

jameswithers

Programmer
Feb 19, 2004
2
GB
Hi,
Coursework Issues:

I have a file with a movie clip on it,
In that movie clip is a sliding pannel,
on that pannel there is another movie,
in that movie there is a button

when the movie is played i want that button to link to a new scene called 'option1'

if the button is out of the movie it works (on the main stage)

the current code is:

on (release) {
gotoAndPlay("option1", 1);
}

Can anyone help me? Please

 
To target the main timeline, from movie clips or from other external movies loaded on other levels of the main movie, you should target labeled frames, rather than scene names which is totally useless. Furthermore, since this method works from anywhere, even on the main timeline itself, you should in fact never target scene names...

Thus to target frame 1 of another scene, label the first frame of that scene with an unique label such as option1 (no number only labels or at least not starting off with a number...), add _root (from any movie clip) or _level0 (from movies loaded on other levels) to your path, and target the labeled frame...

on (release) {
_root.gotoAndPlay("option1");
}

Works like a charm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top