Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flash remoting problem

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
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 pc:pendingCall = 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top