Tag Archives: send parameters when dispatching an event

Custom Event Listener

Custom Event Listener

When writing your AS3 projects, you will need events. The main thing that events do is to help you make a bridge between your instances of classes. take the adobe’s MouseEvent as an example. you add a MouseEvent.CLICK listener to a movieclip so that when you click on a movieclip instance it will dispatch the “CLICK” event. it works like below as you know.


import flash.events.MouseEvent;
mc.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void
{
trace("mc is clicked")
}

this is all good, you have used an event being built by adobe (there are many other premade events by flash if you just check the package flash.events) Continue reading

Leave a comment
Contact UsContact Us
Contact MyFlashLab Team?

Feel free to drop us an email if you have any question regarding the TextArea class or the tag modules.

* required
Send Message