all groups > macromedia flash flash remoting > july 2005 >
You're in the

macromedia flash flash remoting

group:

Help with trace of cfreturn variable


Help with trace of cfreturn variable webchaos99
7/12/2005 7:45:50 PM
macromedia flash flash remoting:
Im trying to pass data from a cf component to my flash file and trace it, but
it keeps coming up undefined.

Cold Fusion Script:
<cfcomponent>
<cffunction name="insertUser" access="remote" returntype="query">
<cfquery name="addUser" datasource="nanoproto1">
select * from nano_user
</cfquery>
<cfreturn addUser>
</cffunction>
</cfcomponent>

Remoting Script in Flash:
#include "NetServices.as"
#include "NetDebug.as"
#include "DataGlue.as"

NetServices.setDefaultGatewayUrl("http://localhost:8500/");
var gw = NetServices.createGatewayConnection();
var server = gw.getService("dbtest2", this);
trace("Connected");
server.insertUser(new insertUser_Result());
trace("sent request");

// :::: DEFAULT RESPONDERS ::::
function insertUser_Result(result) {
trace("server responded: Records: " + result);
}
Re: Help with trace of cfreturn variable TK01
7/15/2005 12:00:00 AM
the gateway uri should be: http://localhost/flashservices/
gateway

AddThis Social Bookmark Button