flex菜单同步选择单选“综合应用”

	private var currentFun:String="yq";//默认初始值,“雨情信息”
			//监听事件
			protected function basewidget1_creationCompleteHandler(event:FlexEvent):void
			{
				//Alert.show("综合应用");
				AppEvent.addListener(AppEvent.SEND_MSG_TO_FUNCTIONSELECTWIDGET_HIDE,handler);
				//菜单同步
				ExternalInterface.addCallback("callRadioApp",this.doRadioHandler);
				//AppEvent.addListener(AppEvent.SEND_MSG_TO_FUNCTIONWIDGET_QXXX,refFun);
			}
			
			//选中相应的radio
			private function doRadioHandler(funName:String):void
			{
				//Alert.show(funName);
				if(currentFun==funName){
					return;
				}
				switch(funName)
				{
					case "yq":
						yq.selected=true;
						break;
					case "sq":
						sq.selected=true;
						break;
					case "db":
						db.selected=true;
						break;
					case "sp":
						sp.selected=true;
						break;
					case "zk":
						zk.selected=true;
						break;
					case "sz":
						sz.selected=true;
						break;
					case "ll":
						ll.selected=true;
						break;	
				}
				
			}
			

你可能感兴趣的:(Flex)