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!

problems with FLVplayback

Status
Not open for further replies.

JohnnyxL

Programmer
Jul 25, 2007
12
0
0
US
Hello all,
I am trying to load an FLV externally and control it with the FLVplayback component. FLVPlayback instance name <my_video>

I get the audi but the controls don't work and no video.
I'm sure I overlooked something simple but I can't seem to find a good tutorial on this.
Thanks in advance. - Johnnyxl

<code>
// Create a NetConnection object
var my_nc:NetConnection = new NetConnection();
// Create a local streaming connection
my_nc.connect(null);
// Create a NetStream object and define an onStatus() function
var my_ns:NetStream = new NetStream(my_nc);
// Attach the NetStream video feed to the Video object
my_video.attachVideo(my_ns);
// Set the buffer time
my_ns.setBufferTime(5);
// Begin playing the FLV file
my_ns.play("/video/flv/myFLVvideo.flv");
</code>
 
Your code is fine, but it's not for FLVPlayBack Component, but it's for playing video stream using Video Class. If you place a Video object on Stage (instead of FLVPlayBack Component) and name it "my_video", it should work.

If you want to use the FLVPlayBack Component, the code is rather simpler:

[tt]my_video.contentPath = "video/flv/myFLVvideo.flv";[/tt]

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top