flex linkbar使用
发布时间:2020-12-15 05:08:24 所属栏目:百科 来源:网络整理
导读:?xml version="1.0"?!-- controlsbarLBarSimple.mxml --mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"mx:Script![CDATA[import mx.controls.Alert;private function show(str:String):void {switch(str) {case "监控":f1();break;case "管理"
<?xml version="1.0"?> <!-- controlsbarLBarSimple.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import mx.controls.Alert; private function show(str:String):void { switch(str) { case "监控": f1(); break; case "管理": f2(); break; } } public function f1():void { Alert.show("监控"); } public function f2():void { Alert.show("管理"); } ]]> </mx:Script> <mx:LinkBar borderStyle="solid" itemClick="show(String(event.label))"> <mx:dataProvider> <mx:String>监控</mx:String> <mx:String>管理</mx:String> </mx:dataProvider> </mx:LinkBar> </mx:Application> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |