"Mannequin3D" <mannequin3d@hotmail.com> wrote:
> I'm using FlashMX and ColdFusionMX. I've opened up the connection the database
> in Actionscript, pinpointed the function within the CFC and have successfully
> populated a text field in Flash with the data retrieved from the CFC
>
> How do I now pull data from a second function in the CFC without opening up a
> new connection to the database in Flash? Here's my Actionscript
>
> [q]var sectionName = "home"
>
> if(isGatewayOpen == null)
> isGatewayOpen = true
>
>
> NetServices.setDefaultGatewayUrl("
http://www.mannequin3d.com/flashservices/gat > ew
> ay")
> gw = NetServices.createGatewayConnection()
> server = gw.getService("cfcDir.home", this)
> server.getAbout(sectionName)
>
> function getAbout_result(result)
> textdata.text = result.items[0].content; // works
> imageDir.text = imageDirectory; // does not wor
> }[/q]And here is the CFC
>
> [q]<cffunction name="getAbout" returntype="query" access="remote"
> <cfargument name="sectionName" required="yes" type="string" default="home"
> <cfquery name="content" datasource="ds"
> Select sectionName from homeAbou
> Where sectionName = '#arguments.sectionName#
> </cfquery
> <cfreturn content
> </cffunction
>
> <cffunction name="getDirectory" access="remote"
> <cfset imageDirectory = "downloads"
> <cfreturn imageDirectory
> </cffunction>[/q]I am trying to return both "content" and "imageDirectory"...
> and I'm unsure how to do this. My ActionScript above successfully retrieves
> the
> first variable - "content" - but it doesn't retrieve the second one.
>
> Thank
>
The getAbout function and getDirectory from actionscript.