-
Disable button click event in AS3
Hi, I'm trying to disable the button click event on a button with no luck. I did some searching but it would always display an error.
button_1.addEventListener(MouseEvent.CLICK,mouseUp Handler);
function mouseUpHandler(evt:MouseEvent):void {
gotoAndPlay(2);
button_1.removeEventListener(MouseEvent.CLICK,mous eUpHandler);
}
But when I set that, I'm still able to click on that button (the actual Over button state animation still occurs).
Any thoughts would be great?
Thanks,
Josh
Last edited by izzysanime; 03-06-2012 at 12:52 PM.
-
Actionscript Code:
button_1.mouseEnabled = false;
-
Thanks for the suggestion, i did try that, but it disables all mouse events. I still would like to have the hover/over state work, just not the click/down state.
Thanks,
Josh
-
in this case you need to create custom button yourself.
use movie clip, draw the states in frames and then manage add event listeners for the states you'd like.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|