AS3 addEventListeners, MouseEvent types

This is for reference.
I use this type of call often when creating flash GUI.

The following code calls they myFunction(); when the MouseEvent.XXXXX is done upon my_MC. myFunction and my_MC are defined by you the coder.

my_MC.addEventListener(MouseEvent.CLICK, myFunction);
function myFunction(){my_MC.play();}

The following are all the available MouseEvent types:

  • MouseEvent.MOUSE_OUT
  • MouseEvent.MOUSE_OVER
  • MouseEvent.MOUSE_UP
  • MouseEvent.MOUSE_WHEEL
  • MouseEvent.RIGHT_CLICK
  • MouseEvent.RIGHT_MOUSE_DOWN
  • MouseEvent.RIGHT_MOUSE_UP
  • MouseEvent.ROLL_OUT
  • MouseEvent.ROLL_OVER

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>