Functions / Event Listeners

The following example would be used to setup the interactivity of a user clicking on an instance name.  It is a two step setup:

  1. Event Listeners (for the instance you wish to click on)
  2. Function Definition (defines what you want to happen)

Part 1 Event Listeners:

instanceName.addEventListener(MouseEvent.CLICK, functionName);

Part 2 Function Definition:

function functionName(event:MouseEvent){
(instructions for function)
}

**Both of these codes go in the actions layer.

 
 
copyright © 2004 - 11 cawd by steven herr. all rights reserved