2 Replies Latest reply on Dec 3, 2007 10:09 PM by Song.zh

    Why not my flex application compatible for ie . firefox and opera

    Song.zh Level 1
      I wrote a flex component to load some menu items, but the app can't run in firefox and opera, only avalible in ie!
      The flash players in those explorer are all flash player 9, I'm very puzzled!
      Can u help me?

      And, Here is my code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Accordion
      xmlns:mx=" http://www.adobe.com/2006/mxml"
      width="100%"
      height="100%"
      creationComplete="menuServ.send();">
      <mx:HTTPService
      id="menuServ"
      url="{_menuXML}"
      fault="menuLoadingError(event)"
      method="POST"
      useProxy="false"
      />

      <mx:Script>
      <![CDATA[
      import mx.controls.Alert;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      //菜单xml文件
      [Bindable]
      private var _menuXML:String;

      public function set menuXML(s:String):void{
      var tmp:String = s;
      if(tmp.indexOf("?")>=0){
      tmp += ("&date="+new Date());
      }else{
      tmp += ("?date=" + new Date());
      }
      this._menuXML = tmp;
      }

      //菜单加载失败
      private function menuLoadingError(arg:FaultEvent):void{
      Alert.show("菜单加载失败","error:" + arg.fault.message);
      }
      ]]>
      </mx:Script>
      <mx:Repeater id="menus" dataProvider="{menuServ.lastResult.menus.menu}">
      <mx:VBox label="{menus.currentItem.label}">
      <mx:Repeater id="subMenu" dataProvider="{menus.currentItem.subMenu}">
      <mx:LinkButton label="{subMenu.currentItem.label}" />
      </mx:Repeater>
      </mx:VBox>
      </mx:Repeater>
      </mx:Accordion>