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!

Changing Movie Clip States 1

Status
Not open for further replies.

braves07

Technical User
Apr 24, 2007
40
US
Hi, I'm using Flash 8.

I have 12 movie clips that have 12 inv_btn inside them. The purpose of these buttons are to change a picture inside a movieclip if it is clicked.

I have a movie clip "pictures_mc" that has 12 pictures inside on different frames. On each new frame there is a stop();

I have this code on each of my inv_btn:
Code:
on (rollOver) {
	gotoAndPlay("over");

}

on (rollOut) {
	gotoAndPlay("default");

}

on (release) {
	_root.pictures_mc.gotoAndPlay("psl_ext");
}

This changes the picture correctly, however I'm having a slight problem. If I click the button once, it changes the picture correctly. If I click the button 2x it will change to the picture that follows it. If I click the button 3x it changes back to the correct picture.

Does anyone know how I can prevent it from changes pictures if I click multiple times? I would prefer to just disable the button when the picture is showing, but I don't know how to check if that picture is showing when all the pictures are in the same movie clip.

Thanks,
braves07
 
psl_ext" is the frame label inside the pictures_mc. I have 12 frame labels.

Thanks,

braves07
 
LOL, that was easy enough. I just assumed it didn't make a difference since there was a stop(); on each frame, but when I changed it to gotoAndStop it works perfect. Thanks for your help oldnewbie.

thanks,

braves07
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top