01 : function getInfo()
02 : {
03 : nc.call( 'sendInfo', new MyResultSetName(), myStream);
04 : }
05 : function MyResultSetName()
06 : {
07 : this.onResult = function ( retVal )
08 : {
09 : _root.streamlength = retVal;
10 : };
11 : this.onStatus = function(info)
12 : {
13 : trace ( 'Level:' + info.level + 'Code:' + info.code);
14 : // process error object
15 : };
16 : }
01 : application.onAppStart = function ()
02 : {
03 : trace('::: Application has started :::');
04 : }
05 : application.onConnect = function (client)
06 : {
07 : application.acceptConnection (client);
08 : // Add methods
09 : client.prototype.sendInfo = function (name) {
10 : var slen = Stream.length (name);
11 : trace ( 'slen:' + slen);
12 : return slen;
13 : };
14 : }
1 : var my_nc:NetConnection = new NetConnection();
2 : my_nc.connect('rtmp://myServer.myDomain.com/appName/appInstance');
3 : var my_ns:NetStream = new NetStream(my_nc);
4 : my_ns.publish('slav', 'live');
5 : my_ns.send('Fun', 'this is a test'); , -1, -1);
5 :
6 : my_ns.Fun = function(str) { //Fun is the handler name
7 : trace (str);
8 : }