Disabling a button in AS3 (myMC.enabled in AS3)
I ran across the problem the other day of trying to disable a button without removing its MouseEvent listeners.
In AS2 you could simply disable a button by setting it’s “enabled” property to false.
AS2
The new and improved way is:
AS3
Note: this requires you have a button with its MouseEvent listeners already set.
This is different than AS2 in that you can actually disable all mouse events for any display object - not just buttons. So be careful what you disable!
About this entry
You’re currently hearting “Disabling a button in AS3 (myMC.enabled in AS3),” an entry on I h♥rt actionscript.
- written:
- 09.27.07 / 1am
- category:
- AS3

1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]