Priority parameter and event handler event
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()">
<mx:Script>
private function a(e:Event):void {
trace("a");
}
private function b(e:Event):void {
trace("b");
}
private function c(e:Event):void {
trace("c");
}
private function initApp():void {
b1.addEventListener(MouseEvent.CLICK, a, false, 1);
b1.addEventListener(MouseEvent.CLICK, c, false, 2);
b1.addEventListener(MouseEvent.CLICK, b, false, 3);
}
</mx:Script>
<mx:Button id="b1" label="Click Me" />
</mx:Application>
Related examples in the same category