This content has been marked as final. Show 5 replies
prototype still works in as3 so you could certainly create a custom method that adds a listener that changes the cursor on MOUSE_OVER and MOUSE_OUT. then you would only need to add that custom method to each of your buttons.
and i think it might be possible to extend the MOUSE_OVER and MOUSE_OUT events to all objects that have listeners for those events but i can't see how to do that with as3, off the top of my head.
it was doable in as2 and i can't see any reason why it wouldn't be allowed in as3.
Hrmm, some of my buttons are done through code but not all. I do have buttons that are already on the stage before runtime. Can I still add a method to these buttons? Can simply giving them a class name through the linkage be enough for those symbols?
you can add methods to buttons created in the authoring environment. just give them instance names in the properties panel and code per your usual.
I remembered that/figured that out after my previous post. What I did was a class that extends SimpleButton and added the events to it. But it only works with buttons that I'm doing something with through code. When the buttons that are on the stage have a base class of either SimpleButton or my customSimpleButton, I get an error:
1046: Type was not found or was not a compile-time constant: breakout_btn.
Do the buttons have to actually be used in my code for the linkage to work properly?
Nevermind, I'm gonna scrap this idea, doesn't look that great.
Thanks for your help though.