Remove button hit!

Hey guys!

I was wondering, I have a button with the following action:

on (release) {
	MyMC.gotoAndPlay(02);
}

Is there some way to remove the button hit while the animation of MyMC is running, so the user won’t be able to use the button until the animation is done? <:}

this should work … paste it into any movie clip actions


onClipEvent (load) {
	this.stop()
}
onClipEvent (enterFrame) {
	if (this._currentframe == 1) {
		this.stop()
		this.enabled = true
	} else {
		this.enabled = false
	}
}
on (press) {
	this.play()
}

Yeah, cool! But how do I assign the action to the buttons, I don’t wanna click the animation!?

NEVERMIND i got it - THX alot m8! :stuck_out_tongue:

Hmmm… new problem commig up: let’s say I have three buttons with three seperate animations, and I wan’t to disable the other two buttons while one animation is running, how can this be done? :*(

if (this._currentframe >= 2) {
	_root.buttonInstanceName.enabled = false
}

[size=1]PS: lol … I never use buttons … they’re useless to me [MX] … so I guess my brain automatically erases the word ‘button’ placing mc instead[/size]

please take a look at this example and tell me what is wrong?

what the hell is going on here??

if you press button 1 … lir 1 plays and disables both buttons
if you press button 2 … lir 2 plays and keeps both buttons enabled
I’ve used the same actionscript so I don’t know what’s the problem … :sleep:

give a moment and I’ll fix it [size=1][I hope :)][/size] … just wanted to tell you the progress

OKI - THX for helping out M8! =)

this is a completely different than my first attempt … but it works

YES it works - and with three buttons as well!

Once again, thx alot dude!

cheers <:}

no problem :smirk:

glad to help