FORUMS: list search recent posts

Create a video player for embedded FLV

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Paul
Create a video player for embedded FLV
on Aug 22, 2011 at 8:30:50 pm

So I want to embed a FLV in my flash so that I just have ONE SWF that contains everything.

I know if I say "load external video with playback component" I will end up with a swf, html and the flv- this is NOT what I want so please don't ask me why I'm not using this option.
"Embed FLV in SWF and play in timeline" is EXACTLY what I want- the result is just a single SWF.

Here is the question: How do I get a video player if I embed a FLV in flash?

I know if I load the video external I will get some nice players - exactly what I want. How do I get a player if the video is embedded? Are there any coded player templates on the net? I couldn't find anything on google I could use but I've to admit I'm not too good at AS.

Thanks A LOT for your help

Return to posts index

demetri tashie
Re: Create a video player for embedded FLV
on Aug 23, 2011 at 12:13:01 am

since you are clear you want to embed video on the timeline, i will refrain from commenting on that.

to my knowledge video on a timeline can not use a 'video player'. i suggest that you should not be thinking of using a 'video player' per se, but just looking to code something that looks like a player, that actually navigates the video timeline you create. video embedded on a timeline is no longer streaming, and therefore traditional video controls do not apply. the video is turned into a timeline animation ( be aware that audio can go horribly out of syn on timeline embedded video. also, your file size gets huge...).

after creating movieclips to use as the control buttons, you can very easily and quickly emulate most of a video players controls : play, stop/pause, rewind. You can even create a status bar fairly easily. other more specific controls would need further coding.

do you have this video on the main timeline , or in a separate moveclip?
assuming your FLV was imported to the main stage, here is some code that can be used to control the timeline.
playBtn.addEventListener(MouseEvent.CLICK, goPlay);
function goPlay(e:Event):void {

pauseBtn.addEventListener(MouseEvent.CLICK, goPause);
function goPause(e:Event):void {

rewindBtn.addEventListener(MouseEvent.CLICK, goRewind);
function goRewind(e:Event):void {

stage.addEventListener(Event.ENTER_FRAME, barGrows);
function barGrows(e:Event):void {

note: 'statusBar', the movieclip created to show the progress, will appear 'complete' at 100px wide. you of course adjsut this as desired.

hope this makes sense and helps.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved