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!

misbehaving button

Status
Not open for further replies.

esearing

IS-IT--Management
Aug 22, 2000
132
US
I have a button which directs play in scene 2

on (release) {
gotoAndStop ("Scene2",2);
}

Occaisionally when the button is pressed, the movie will jump to Scene 1, Frame2 and Stops. Scene 1 contains a moving text effect.

I am able to force the situation by pressing the button 3 times. while frame 2 is loaded.

Any Ideas??
Should I add something like::
on (release) {
if (_framesLoaded == 2){
stop(); //or break();
}
else {
gotoAndStop ("Scene2",2);
}
}

 
Can you post the fla somewhere? The first method should work fine.
 
I figured it out. Left out the space in the scene name. But I still don't get why it would jump to Scene one after 3 clicks.

on (release) {
gotoAndStop ("Scene 2", 2);
}

 
Where's this button exactly? Scene 1 or Scene 2? How many frames in Scene 2? Seems to me, on each press the movie is advanced to the next frame, and when it reaches the end of Scene 2, it cycles back to scene 1, which is normal.
You could set a variable to true once you're on that frame, and then condition the button's script somewhat like:

on (press) { // I hate on release!
if (variable == true){
stop();
} else {
gotoAndStop ("Scene 2",2);
}
}

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

Part and Inventory Search

Sponsor

Back
Top