Copy link to clipboard
Copied
The CF11 integration notes describe how to do use Flash Remoting. I use that in my AS2 code and it works fine. I'm trying to migrate to AS3 where there is no Remoting. I have done the following:
import flash.net.*;
import flash.events.*;
var CFCService = new NetConnection()
CFCService.objectEncoding = 0;
CFCService.connect("http://localhost:8500/flashservices/gateway/")
var responder2 = new Responder(getActiveUsers_Result, onFault);
CFCService.call("cfc.SyslockComponents.getActiveUsers", responder2);
stop();
function getActiveUsers_Result(result:Object):void
{
trace("getActiveUsers Result Status: " + result.STATUS);
for (var property:String in result)
{
trace(property +" : " +result[property]);
}
}
The OUTPUT of my program shows the contents of the STRUCT returned by the CFC:
getActiveUsers Result Status: ALLOK <<<<<< the CFC completed successfully
RECCOUNT : 1 <<<<<<<< There was one record select by query
DETAILS : [object Object] /<<<<<< this contains the query results
STATUS : ALLOK
I don't know how to process DETAILS because RECORDSET is not available in AS3.
Have something to add?