I’m using FlashMX and ColdFusionMX and I have a question about remoting. How do you cycle through different functions within the CFC without opening up a new connection in Flash?
For example … if I connect to my CFC in Actionscript like this:
//this is the connection
var sectionName = "home";
if(isGatewayOpen == null){
isGatewayOpen = true;
}
NetServices.setDefaultGatewayUrl("http://www.mannequin3d.com/flashservices/gateway");
gw = NetServices.createGatewayConnection();
server = gw.getService("cfcDir.home", this);
server.getAbout(sectionName);
and use this connection to populate my Flash:
//populating dynamic text field
function getAbout_result(result){
textString.text = result.items[0].content; // via "home.cfc"
}
…how would I then reference a second function within the same CFC without having to repeat the first step? I can no longer use “function getAbout_result(result)” because it applies to a different function. Let’s say my second function within the CFC looks like this:
[color=silver]<!--- send back the variable "imageDirectory" --->[/color]
<cffunction name="getDirectory" access="remote">
<cfset imageDirectory = "myImages">
<cfreturn imageDirectory>
</cffunction>
How would I return this variable, “imageDirectory” back into flash?
I’m confused. :hr: