I have a button. This button uses tellTarget to make a movie clip play. I only want this to happen once. The button stays on the stage while the clip plays. If the user clicks the button again the movie clip will start again. I don’t want this to happen. So user clicks, movie clip plays, user clicks again, nothing must happen.
At a frame before the frame your button is at, place this:
[AS]
_root.pressed = false;
[/AS]
And on your button, place this:
[AS]
on(release){
if(!_root.pressed){
_root.movieclip.gotoAndPlay(5)
_root.pressed = true;
}
}[/AS]
Of course, _root.movieclip.gotoAndPlay(5) is just an example of a play action. Replace it with your play action. And, you can of course also change on (release) to on(press) or anything else.