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

Coded needed for button inside a movie clip

Status
Not open for further replies.

nesart

Technical User
Feb 16, 2005
2
0
0
US
Hello.
I've just created a movie clip that has 2 frames. On the first frame I have a button that is supposed to take me to the second frame of the movie clip when pressed how do I accomplish this with code?
 
Click on the button and under it's actionscript place the following:

on (release) {
gotoAndStop(nextFrame);
}

Alternatively, if you want it to move to the next frame immediately when you click instead of when you release, use this instead.

on (press) {
gotoAndStop(nextFrame);
}

 
if it's applied to a button inside the movie clip during the first frame, then it would be my code. if you were clicking directly on the movie clip it would be like that. but yeah, to go back a frame it would be oldnoobs second code, without the "this" code.

 
Actually crazy this.prevFrame is correct in both cases. Your method is also correct, Olds is just more specific. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top