Hi,
 
Yeah Flex works with Flash .Net Remoting gateway. If you have .Net Remoting gateway installed with samples on your machine(localhost), you can run the following example under flex server. Following is the straight forward port of a flash application to flex code. You can compare the code to see, how easier life is with Flex :). Yeah, this example doesn't represent best-practice, as usual its quick and dirty example :)
 
 
 
##DotNetRemotingTest.mxml##
 
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" creationComplete="getCountryList();">
 
    <mx:RemoteObject id="remoteTagInfo" source="flashremoting.samples.ado" endpoint="http://localhost/flashremoting/gateway.aspx">
            <mx:method name="CustomerInfo" result="resultHandler(event.result)"/>
    </mx:RemoteObject>
 
    <mx:Script>
        <![CDATA[
   
      function getCountryList()
   {
    
     remoteTagInfo.CustomerInfo();
   }
  
   function resultHandler(result)
   {
       if(countryList_cb.selectedItem==undefined)
       {
           countryList_cb.dataProvider = result;
       }
       else
       {
           details_dg.dataProvider = result;
       }
      
         
  }
       ]]>
    </mx:Script>
 
    <mx:Panel title="flashremoting.samples.ado sample" width="50%" >
        <mx:ComboBox id="countryList_cb" change="remoteTagInfo.CustomerInfo(String(event.target.selectedItem['Country']));" />
        <mx:DataGrid id="details_dg" width="100%"></mx:DataGrid>
    </mx:Panel>
 
</mx:Application>
 
 
Let me know, if you have any doubts understanding above. You can find the .Net code in <gateway_installation_folder>\flashremoting\samples\ado. On my machine it is, C:\Inetpub\wwwroot\flashremoting\samples\ado
 
 
 
Hope that helps..
 
-abdul
 
 
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Thursday, May 19, 2005 1:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can Flex make .NET Remoting Calls?

Hello All,
 
I extensively use the Remoting Components for .NET in regards to the Flash MX 2004 environment.
 
Provided everything is in place, and working properly for Flash, this should theoretically work if I make calls to the same services using Flex correct?  Could you all clarify that for me?
 
Thanks,
 
Mike
 


Yahoo! Groups Links

Reply via email to