2 Replies Latest reply on Mar 17, 2010 12:47 PM by laxmidi

    Can I Make 2 Remote Calls at the Same Time?

    laxmidi Level 1

      Hi,

       

      Can I make 2 remote calls at the same time? For example, if I have the following remote objects:

       

      <mx:RemoteObject id="myRemote" destination="zend" source="MyData" showBusyCursor="true" fault="faultListener(event)">

           <mx:method name="getData" result="getDataListener(event)"/>

       

      </mx:RemoteObject>

       

      <mx:RemoteObject id="myRemote2" destination="zend" source="MyData2" showBusyCursor="true" fault="faultListener(event)">

           <mx:method name="getData2" result="getDataListener(event)"/>

       

      </mx:RemoteObject>

       

      And I call them at the same time:

       

      public function myFunction():void {

           myRemote.getData();

           myRemote2.getData2();

      }

       

      Will it work? Will Flex "confuse" the results of one call with the results of the other call? Do I need an AsyncToken? If so, how do I use an AsyncToken in the above example?

       

      Thank you,

       

      -Laxmidi