<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()">
<!-- -->
<mx:Button id="button1" />
</mx:Application>
private function init():void{
var onClick: Function = function ( event :MouseEvent):void{
trace( "event handled" );
button1.removeEventListener(MouseEvent.CLICK, onClick);
}
button1.addEventListener(MouseEvent.CLICK, onClick);
}
* This source code was highlighted with Source Code Highlighter .
private function init():void{
var onClick: Function = function ( event :MouseEvent):void{
trace( "event handled" );
button1.removeEventListener(MouseEvent.CLICK, onClick);
}
button1.addEventListener(MouseEvent.CLICK, onClick);
}
* This source code was highlighted with Source Code Highlighter .
private function init():void{
var onClick: Function = function ( event :MouseEvent):void{
trace( "event handled" );
button1.removeEventListener(MouseEvent.CLICK, onClick);
}
button1.addEventListener(MouseEvent.CLICK, onClick);
}
* This source code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/58080/