House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / Adobe Flex

connecting Flex & ColdFusion

Author:
John Barrett
12/14/2009 12:09 AM

Hi, I am trying to connect CF & Flex with remoting. I got flex set up for remoting, and I have this flex code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()">   <mx:Script>     <![CDATA[              import mx.rpc.events.ResultEvent;       import mx.collections.ArrayCollection;              [Bindable]       private var acArtists:ArrayCollection;              private function initApp() :void {         ArtistGateway_RO.getArtist();       }              private function getArtistsRO_Handler(event:ResultEvent):void {         acArtists = ArrayCollection(event.result);       }     ]]>   </mx:Script>         <mx:RemoteObject id="ArtistGateway_RO" destination = "ColdFusion" source ="com.cfcs.ArtistGateway">     <mx:method name="getArtists" result = "getArtistsRO_Handler(event)" />   </mx:RemoteObject>      <mx:DataGrid dataProvider = "{acArtists}" right="10" left="10" top="10" bottom="10">   </mx:DataGrid>    </mx:Application> my cfc is located in localhost/com/cfcs/ArtistgateWay.cfc <cfcomponent output="false">   <cffunction name="getArtists" access="remote" returntype="query">       <cfset var qRead = "" />                  <cfquery datasource="cfartgallery" name="qRead">             SELECT artistid, firstanme, lastname, email             FROM artists         </cfquery>                  <cfreturn qRead />     </cffunction> </cfcomponent> when I run the appication I get an flash player error saying can't find coldfusion component? Am I doing something wrong? Flex is looking at com as http://localhost/com right ? Thanks so much, Johnny


Search flex

February 11, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29