thanks Jorge Solis,
i m using this...And im now using the getLiveStreams() methos which will return the publisher and subscriber for me in the place of pblisher its retuininh [object objet] .Please can u tell that how i can extract the this and gets it property.
here is i m calling the function
nc.call('getLiveStreamStats', new onGetLiveStreamStats(), demo.text, demo1.text);
...
function onGetLiveStreamStats()
{
this.onResult = function(info)
{
if (info.code != 'NetConnection.Call.Success')
{
outputBox.text = 'Call failed: ' + info.description;
} else
{
outputBox.text = 'Info for ' + demo.text + ' returned:' + newline;
printObj(info,outputBox);
}
};
}
....
function printObj(obj, destination, tabLevel)
{
tabLevel = -1;
//trace("destination = "+destination+"tab level = "+tabLevel+"obj ="+obj);
if (arguments.length < 2)
{
trace('ERROR! you need to supply a text object to output to');
return;
}
if (arguments.length < 3)
{
tabLevel = 0;
}
for (var prop in obj)
{
for (var i = 0; i < tabLevel; i++)
{
// insert requested # of tab characters
destination.text += '\t';
}
destination.text += prop + ' = ' + obj[prop] + newline;
if(prop=="publisher" or prop=="subscriber"){
for (var prop1 in obj){
trace("object = "+obj[prop1]);
}
}
if (typeof (obj[prop]) == 'object')
{
// recursively call printObj
printObj(obj[prop], destination, tabLevel + 1);
}
}
}
...
Regards,
Abrar.