FORUMS: list search recent posts

Custom FLVPlayer that has nextFrame/prevFrame button?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Arturo Baladhiga
Custom FLVPlayer that has nextFrame/prevFrame button?
on Jul 3, 2010 at 3:13:51 pm

I want to create a customized flash player in Flash CS4 that will play multiple FLV videos recorded from a camcorder and I am a beginner to flash.

I want to know if it is possible for me to program the custom made flash player to:

1.) play
2.) stop
3.) pause
4.) mute


5.) go to next frame
6.) go to previous frame

- Because I want the player to play frame by frame in every mouse click of the button to produce a controlled slow motion effect to my flv videos. If you can give me a video tutorial or links that will help me learn to put a nextframe/prevframe button on a custom player I will really appreciate it.

Return to posts index

demetri tashie
Re: Custom FLVPlayer that has nextFrame/prevFrame button?
on Jul 5, 2010 at 6:16:29 pm

taking care of #1,#2,#3 & #4 is easy. assuming you are using a FLVPlayback component, and if it is named "player" , then;
player.pause() and

are the codes which take care of all that.

#5 is a little bit more tricky. there are several ways to approach this. one would be to add event cue-points every 1/2 second or so, and if they were all named the same name, "stop" or something, then you could add MetadataEvent listener to stop the video when it reaches the cue point with the name "stop"

or you could listen for an increment in the current playhead time, and stop the playback. here is some code that demonstrates this. it is NOT perfected code, just a good working example you can play around with and which demonstrates how you might approach this. this has a 1/2 second ( +.5) interval for the 'stop action' effect once youclick on button "b":



b.addEventListener(MouseEvent.CLICK, firstFunction); //the button to control the action

var curr:Number=flvPlayer.playheadTime;
var curr2:Number=flvPlayer.playheadTime +.5;
function firstFunction(event:MouseEvent):void {;
addEventListener(Event.ENTER_FRAME, listens);
function listens(event:Event):void {
if (curr>=(curr2)) {


as for # 6 - as far as i know you can not run a vide backwards.

i remeber making an elaborate example to make it appear that it was doing just that. it is an advanced process, involving toggling the visibility of 2 video players superimposed on each other. the first one is the video encoded playing forward, the second has the same exact video, but with all of its frames running in a reversed direction. then some complicated math keeps track of the playheads.

Return to posts index

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