Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Streaming Video with Flash Media Server

Status
Not open for further replies.

wavematt

Programmer
Apr 16, 2008
9
0
0
US
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.

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!
 
Yeah, I tried all of that. Still wasn't able to figure out the problem with that code though. I ended up just using the FLVPlayback component. Wasn't my first choice of how to handle the streaming audio and video in my application but it ended up working out anyways.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top