-
1. Re: How can I execute certain code once the button on stake is hit at runtime? (in Flash CS4(AS3))
markerline Feb 25, 2010 1:03 PM (in response to Me2LoveIt2)By passing a MouseEvent to a function. Look up Mouse Events in the help files. Plenty of leads.
-
2. Re: How can I execute certain code once the button on stake is hit at runtime? (in Flash CS4(AS3))
Me2LoveIt2 Feb 25, 2010 1:14 PM (in response to markerline)Thanks for the quick answer, but my project already has a mouse event listener which does something else.
Is there no other way?
I mean a way where it refers directly to the button?
-
3. Re: How can I execute certain code once the button on stake is hit at runtime? (in Flash CS4(AS3))
markerline Feb 25, 2010 1:19 PM (in response to Me2LoveIt2)You can also try to create an event listener for the button itself. (In as2.0 it was onClick or onPress or something to that effect, now I'm not sure what they are syntaxed as but there are event listeners for buttons which "listen" to see if the button has been pressed. Mouse Events are good because it makes sure that the mouse is actually performing the action. Don't know about accessibility with Mouse Events though since you can use a Tab key to direct input of buttons so try the Button event listeners.

