I'm using ActionScript 3.0 and Flash Media Server 3 and I'm trying to stream an flv video with CODE ONLY but I keep getting the error message "NetStream.Play.StreamNotFound."
I'm trying to avoid using the FLVPlayback component in this application. The funny thing is... when I actually use the FLVPlayback component on the timeline and set the "source" property of the component to the correct url, the video will stream just fine. But from what I've gathered from various books and Google searches, this code SHOULD WORK. Here is a simplified version of my code.
Any idea on why I'm getting this error when I use this code but NOT when I do it with the FLVPlayback component? It's driving me crazy. I'm suspecting that the problem might be in the NetConnection's connect function, but I can't figure it out.
Someone help me please!
I'm trying to avoid using the FLVPlayback component in this application. The funny thing is... when I actually use the FLVPlayback component on the timeline and set the "source" property of the component to the correct url, the video will stream just fine. But from what I've gathered from various books and Google searches, this code SHOULD WORK. Here is a simplified version of my code.
Code:
//net connection and net stream
var my_connection:NetConnection = new NetConnection();
my_connection.connect(null);
var my_stream:NetStream = new NetStream(my_connection);
//video
var my_video:Video = new Video();
my_video.attachNetStream(my_stream);
addChild(my_video);
//start playing stream
my_stream.play("rtmp://mywebsite/vod/myvideo.flv");
Any idea on why I'm getting this error when I use this code but NOT when I do it with the FLVPlayback component? It's driving me crazy. I'm suspecting that the problem might be in the NetConnection's connect function, but I can't figure it out.
Someone help me please!