03-21-06 07:48 AM
I'm trying to pull some stats down from my server (FMS2), but I think
I'm running into some problems formatting the result handler correctly.
Here is my code:
main_nc =3D new NetConnection();
main_nc.onStatus =3D function(info) {
if (info.code =3D=3D "NetConnection.Connect.Success") {
trace("NetConnection Successful");
var resObj =3D new Object();
resObj.onResult =3D function (val):Void {
trace(val.code);
trace("Bytes_In is:" +
val.data.bytes_in);
};
main_nc.call("getIOStats()", resObj);
} else {
trace("ERROR: " + info.code);
}
};
main_nc.connect("rtmp://string removed");
This code gives me:
NetConnection Successful
NetConnection.Admin.CommandFailed
Bytes_In is:undefined
I have also tried using the code on page 401 of O'Reilly's Programming
Flash Communication Server, and I get this error code back:
**Error** Scene=3DScene 1, layer=3DActions, frame=3D1:Line 25: There is =
no
property with the name 'responder'.
pcall.responder.result =3D function (result) {
Total ActionScript Errors: 1 Reported Errors: 1
I have the FCSAdminConnector, FCSAdminAdaptor, PendingAdminCall, and
FCSConstants files downloaded and installed on my local machine, with
the classpath set to point to their location. I'm using Flash
Professional 8 for development.
I'm still getting my feet wet with ActionScript, so I'm hoping these are
newbie mistakes with easy fixes. If anybody can help me over the
hurdle, it would be much appreciated!
Thanks,
Mike
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
[ Post a follow-up to this message ]
|