actionscript 3 - Detect state (over, up, down) of button in AS3 -


i searched document didn't find way detect changing state of button. know way? thanks

i'm going hazard guess you're using flash professional , you're in fact trying detect mouse events on movieclip?

the code below detect of button hovered on , trigger function:

button.addeventlistener(mouseevent.mouse_over, buttoneventlistener); button.addeventlistener(mouseevent.mouse_out, buttoneventlistener);  function buttoneventlistener(e:mouseevent):void {     switch (e.type) {         case mouseevent.mouse_over:             //on mouse on         break;          case mouseevent.mouse_out:             //on mouse out         break;     } } 

the lack of information means guess apologies if isn't you're looking for.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -