I’m converting a AS2 project to AS3 and I need to get AMFPHP working in AS3. I seem to have the basics of it down. I’m able to communicate with the server and get simple results back.
But I’m having an issue with this pageAbleResults thing. For larger queries that return many rows (like 600)… I’m getting
serviceName: PageAbleResult
initialData:
so the initial data is blank? I’m not really sure what to do here. I don’t want the data paginated.
I’m using the AMFPHP 1.9 beta, have that setup… and I have confirmed that my queries work.
Basically I want my data the way it looks in the “RecordSet View” tab on the new AMFPHP browser.
I’m NOT setting a pagesize in my methodTable… so I’m not sure why I’m getting these pageable results.
So does anyone know how I can get my data from the resulting object of an AMFPHP call?
package {
import fl.data.DataProvider;
import flash.net.Responder;
import flash.display.*;
public class palabras_editor extends MovieClip {
public var dataProvider:Array;
public var gateway:RemotingConnection;
public function palabras_editor() {
this.init();
}
public function init() {
trace("wprds");
var gatewayUrl:String="http://xxxxxxxxxxxx/gateway.php";
gateway=new RemotingConnection(gatewayUrl);
var responder:Responder=new Responder(onResult,onFault);
var arg:String='foo';
//gateway.call( "palabras_Service.checkLogin", responder, "user", "pass");
gateway.call("palabras_Service.getClipInfo",responder,"site","NULL","11");
}
public function onResult(result:Object):void {
trace('onResult invoked');
//var dp:DataProvider = new DataProvider(Array(result.serverInfo));
//dataProvider = Dataresult;
var cant:Number = result.serverInfo.totalCount
trace("COLS: " + cant);
var i=0;
for (var key:String in result.serverInfo) {
trace("KEYS " + key);// key (a, b, c)
trace("VALUES " + result.serverInfo[key]);// value (1, 2, 3)
}
}
public function onFault(fault:String):void {
trace('onFault invoked');
trace(fault);
}
}
}
package {
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
public class RemotingConnection extends NetConnection {
public function RemotingConnection( sURL:String ) {
objectEncoding = ObjectEncoding.AMF0;
trace(",pojp__");
if (sURL) {
connect( sURL );
}
}
}
}