Flash Event写法

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Button x="144" y="190" label="Button">
        <mx:click>
            <![CDATA[
                import mx.controls.Alert;
                Alert.show("click");
            ]]>
        </mx:click>
        <mx:focusOut>
            <![CDATA[
                import mx.controls.Alert;
                Alert.show("focusOut");
            ]]>
        </mx:focusOut>
    </mx:Button>

</mx:Application>
对优化代码很有好处 

Flash Event写法