I recently upgraded from Flash MX 2004 to Flash 8 Professional. I'm still trying to get Flash Remoting to work with the new version. Using the NetConnection debugger I can see that the program is connecting to the server, but nothing gets returned from the component's function. Here's the code :
import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
var myURL:String = "
var myServicePath:String = "temp.temp_component";
var myService:Service = new Service(myURL, null, myServicePath);
var pcendingCall = myService.myFunction();
pc.responder = new RelayResponder(this, "myFunction_Result","myFunction_Fault");
function myFunction_Result(myResult:ResultEvent){
trace(myResult.result);
}
function myFunction_Fault(myFault:FaultEvent){
trace(myFault.fault.faultstring);
}
And the function (nested in the server as <root>/temp/temp_component.cfc:
<cfcomponent>
<cffunction name="myFunction" access="remote" returntype="string">
<cfset thisString = "hi">
<cfreturn thisString>
</cffunction>
</cfcomponent>
This has been holding me up for almost a week now, so if anyone could help I would greatly appreciate it. Thanks.
Al Ridley
Lucid Web Designs
import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
var myURL:String = "
var myServicePath:String = "temp.temp_component";
var myService:Service = new Service(myURL, null, myServicePath);
var pcendingCall = myService.myFunction();
pc.responder = new RelayResponder(this, "myFunction_Result","myFunction_Fault");
function myFunction_Result(myResult:ResultEvent){
trace(myResult.result);
}
function myFunction_Fault(myFault:FaultEvent){
trace(myFault.fault.faultstring);
}
And the function (nested in the server as <root>/temp/temp_component.cfc:
<cfcomponent>
<cffunction name="myFunction" access="remote" returntype="string">
<cfset thisString = "hi">
<cfreturn thisString>
</cffunction>
</cfcomponent>
This has been holding me up for almost a week now, so if anyone could help I would greatly appreciate it. Thanks.
Al Ridley
Lucid Web Designs