Beginning Of Event and EventListeners With Actionscript 3.0
August 16, 2008 – 9:42 pmEvent class had a big change with Actionscript 3.0. Those changes effect and make thins much easier for developers. The main idea behind that is having better controls on objects. Better control on codes it will decrease number of the errors. Also will help you too manipulate your code after while.
For example: You have made a project with Actionscript 3.0. Couple months after you finish project your costumer or employee wants to add a new functionality. Main problem over here will be adding code on a working system with out breaking functionality that is exist. Usually is hard to add some code on a system that is working. In this point is matter how good you can control your objects. If you can control your objects easily adding new codes will be easy. If is not you will have more serious problems about adding new functionality. And for more control you should definitely use the event class good.
What is Event?
Event is respond of an object to the other objects in Actionscript when some action happen. Best and easiest example is actions that happen when you click a button in Actionscript. But do not think of that only for buttons. Events can be in lots of types. Beginning of an animation, ending of animation, image that start to be load or anything like this can be an event. Any action that happens is beginning or ending of an event.
Event Listeners
Event listeners check or listen to object for any change or action. Event listeners give us information of did animation start, did some click button, did image loaded, did connect to server or any information like this. When expecting event occur event listeners run block of code which had been specified before.


