I was playing with this a while ago too....
This is the solution I came up with. I have amfphp installed on my
server.
First I make a class called 'RemotingService':
package {
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
public class RemotingService extends NetConnection {
function RemotingService(url:String) {
objectEncoding = ObjectEncoding.AMF3; // verander eventueel naar
AMF0 voor compatibiliteit
connect(url);
}
}
}
Then a class which does the remoting (with some basic parsing):
package {
import RemotingService;
public class Remoting {
private var rs:RemotingService;
function Remoting() {
}
private function getData() {
rs = new RemotingService("http://www.someadress.com/_amfphp/
gateway.php");
var responder:Responder = new Responder(theresult,
theproblem);
rs.call(classPath, responder);
}
private function theresult(re:Object):void {
for ( var a in re.serverInfo.initialData ){
for ( var b in re.serverInfo.initialData[a] ){
trace(b+" =
"+re.serverInfo.initialData[a][b]);
};
trace("");
};
}
private function theproblem(fault:Object):void {
trace(fault);
}
}
}
Hope this helps.
Greetings
Ypmits
Op 16-apr-2007, om 17:57 heeft Mark Walters het volgende geschreven:
Is there any class that you know of like RecordSet or
ArrayCollection for
AS3 only projects (not flex)?
I'm looking for a class to handle database query results a little
easier.
--
Mark Walters
[EMAIL PROTECTED]
http://digitalflipbook.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com