View Full Version : Streaming FLV file in an fla
Pittsb J
03-05-2008, 01:42 AM
Hi All,
Does anyone know a tutorial for streaming FLV files in an fla? I've been searching and haven't found anything yet. I'm using this code below but I only get a blank swf file. The swf file is in the same directory as the flv.
var nc:NetConnection = new NetConnection;
var ns:NetStream = new NetStream(nc);
var my_video:Video = new Video();
my_video.attachVideo(ns);
ns.setBufferTime(0);
ns.play("video.flv");
KECrawford
03-05-2008, 02:13 AM
GoToAndLearn.com has a video that shows how to build a video player from scratch in ActionScript 3.0.
Otherwise you can use the FLVPlayback object which has lots of examples on help and over the web.
Hope this helps.
K.
underlord
03-05-2008, 02:57 AM
Check out this thread. http://www.actionscript.org/forums/showthread.php3?t=159194
Pittsb J
03-05-2008, 03:23 AM
Thanks for the advice everyone. I am now convinced that the issue is not with my code. I did the gotoandlearn.com example exactly and I only get a blank swf screen when I run my code. It's like it's not even looking at the .flv file even though the flv file is in the same directory as my code. Any suggestions? I'm pretty certain that the issue is not in the code or the way I set up the fla file.
Pittsb J
03-05-2008, 04:10 AM
Also, when I double click on any .flv file on my computer, it opens Adobe Flash Player but it just gives me a blank white window. It doesn't play the file at all. Anyone run into this before? I never really used Flash Player much so I'm unsure if it's ever worked correctly.
creynders
03-05-2008, 05:01 PM
You can't just instantiate the Video class. You need to create a "Video Symbol" in your library and place an instance of it onstage. Then you can give it an instance name and control it.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.