Macromedia Flash Server - Server Management API help

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > March 2006 > Server Management API help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Server Management API help
Mike Elskamp

2006-03-21, 2: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

Stefan Richter

2006-03-21, 2:48 am

Could you show us what your rtmp string looks like exactly (Without giving
away all details of course).
I am interested in this line:
main_nc.connect("rtmp://string removed");

Stefan




> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of
> Mike Elskamp
> Sent: 20 March 2006 17:48
> To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> Subject: [FlashComm] Server Management API help
>
>
> 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 = new NetConnection();
> main_nc.onStatus = function(info) {
> if (info.code == "NetConnection.Connect.Success") {
> trace("NetConnection Successful");
> var resObj = new Object();
> resObj.onResult = 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=Scene 1, layer=Actions, frame=1:Line 25:
> There is no property with the name 'responder'.
> pcall.responder.result = 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
>


________________________________________
_______
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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com