I am new to actionscript, basically i am trying to stream video player but we can't use attachVideo in as3 so what can i use instead of attachVideo in following code? Im using flash builder/flex 4.6 . If you could suggest link/tutorial for streaming video player it would be great help. Thank you!
private function initOutStream():void
{ /* streamOut is NetStream to adobe cirrus ,
conn is making connection to adobe cirrus */
trace("initOutStream");
streamOut = new NetStream(conn,NetStream.DIRECT_CONNECTIONS);
streamOut.addEventListener(NetStatusEvent.NET_STATUS,streamStatus);
streamOut.publish("media");
// mp4 file from local machine
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.play("t.mp4");
ns.client = this;
var vid:Video = new Video;
vid.attachNetStream(ns);
// streaming vid to media server
streamOut.attachVideo(vid);
var streamOutClient:Object = new Object();
streamOutClient.onPeerConnect = function(farStream:NetStream):Boolean
{
return true;
}
}
error: 1061: Call to a possibly undefined method attachVideo through a reference with static type