var meta:Object = new Object()
meta.onMetaData = onMetaData
ns = new NetStream(nc)
ns.client = meta
public function onMetaData(info:Object):void
{
this.dispatchEvent(new Event(EVENT_HIDE_LOADER))
}
var meta:Object = {};
//при получении метаданных
meta.onMetaData = onMetaData;
//при получении текстовых данных (например субтитров)
meta.onTextData = onTextData;
ns = new NetStream(nc);
ns.client = meta;
//определение обработчика состояния стрима
ns.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);
this.dispatchEvent(new Event(EVENT_CONNECT_SUCCESS));
this.attachNetStream(ns)
var stream:NetStream = new NetStream();
stream.publish();
var meta:Object = {
x: 10,
y: 20,
name: "test",
// ...any info;
}
stream.send("@setDataFrame", "onMetaData", meta);