import com.newgrounds.API; API.addEventListener(event:String, listener:Function[, target:*]);
- event - The event name to check. This should be one of the constants in APIEvent.
- listener - The function that will run when the event is triggered.
- target - The object or movieclip that "this" should refer to from inside the listener function. (Actionscript 2.0 ONLY!!!)
This method adds a listener to the requested event. When the event is triggered, your listener function will run.
See the API Events page for more details.