2 Replies Latest reply on May 13, 2010 4:53 PM by mxvx

    Remote Object Bubbling

    mxvx Level 1

      Hi

       

      I have a component which is having a remote object.

       

      Is it possible to bubble the faultevent or result event generated by the remote object.? Can I do something as mentioned below?

       

       

      Comp1.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:RemoteObject id="rem" destination="TestService" result="onComplete(event);" showBusyCursor="true"  />

      <mx:VBox>


      MainComp.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
      <mx:Script>
        <![CDATA[
         import mx.controls.Alert;
         import mx.rpc.events.FaultEvent;
         private function init():void {
          comp1.addEventListener(GenericEvent.FAULT_EVENT,faultEvent);
         }
        
         private function faultEvent(event:FaultEvent):void  {
          Alert.show("Ersdasdfsdfrrror ");
         }
        ]]>
      </mx:Script>
      <ns2:Comp1 id="comp1" x="72" y="55" >
      </ns2:Comp1>

      </mx:Application>

       

      Regards

      mxvx