hello all
i wrote codes to streaming flv from fms,but i got the connection error.
here is my connection code:
public function connection():void{
var video :Video = new Video(160,120);
var nc :NetConnection = new NetConnection();
nc.connect("rtmp://localhost/videodisplay/greenday.flv");
var stream:NetStream = new NetStream(nc);
stream.play("greenday.flv");
video.attachNetStream(stream);
video.width = 160;
video.height = 120;
canvas.addChild(video);
}
i got following error report :
ArgumentError: Error #2126: must connect NetConnection object ¡£
at flash.net::NetStream/flash.net:NetStream::construct()
at flash.net::NetStream$iinit()
at HelloFms/connection()
at HelloFms/___Application1_creationComplete()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
Error #2044: unhanded NetStatusEvent:¡£ level=error,
code=NetConnection.Connect.Failed
at HelloFms/connection()
at HelloFms/___Application1_creationComplete()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
does anybody ever face these problem ? i will appreciate if somebody
give me some suggestion .