FLEX 动态添加事件

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
				layout="absolute"
				verticalAlign="middle"
				backgroundColor="white"
				initialize="init()">
	<mx:Script>
		<![CDATA[
			import mx.controls.Alert;
			import mx.events.CloseEvent;
			private function init():void
			{
				Ind.addEventListener(Event.CHANGE,Ind_changeHandler);
			}
			protected function Ind_changeHandler(event:Event):void
			{
				Alert.show("Ind");
			}
		]]>
	</mx:Script>
		<mx:RadioButton x="337" y="42" groupName="showModel" label="Individual" id="Ind" selected="true"/>
</mx:Application>

原文地址:https://www.cnblogs.com/zcy_soft/p/1966688.html