Skip to main content
Participating Frequently
March 26, 2012
Question

AS3 - FastForwad / Rewind in Flash Video Frame does't change properly.

  • March 26, 2012
  • 2 replies
  • 1326 views

Hi all,

I am having Fast - Forward and Rewind Functionality in my Custom Video Player, Which I done by calling seek method on regular interval . which works fine. but for same cases , the video playHeadTime get changed , but the frame does not change with that, and video's playHeadTime and Frame does not come with sync.

No idea how to make it woking.

Can anybody have any idea on that??

Thanks

Meghana

This topic has been closed for replies.

2 replies

megha23Author
Participating Frequently
March 27, 2012

Here is My Code

private function StartForward(evt:MouseEvent)
       
{
            trace
("StartForward Called");
           
SeekSpeedFor = SeekSpeedFor +10;
            trace
("SeekSpeed: " + SeekSpeedFor);
           
SeekPointFR = myVid.playheadTime;
            trace
("Initial PlayHead Time: " + SeekPointFR);
            myVid
.stop();
           
RewindFlag = false
           
ForwardFlag= true;
            myVid
.addEventListener(Event.FRAME_CONSTRUCTED,OnConstructFrame);

       
}


       
public function OnConstructFrame(evt:Event):void
       
{

           
if(ForwardFlag)
           
{
               
if(myVid.playheadTime >= SeekPointFR)
               
{
                    trace
("Before Seek Cal.: " + SeekPointFR);
                   
SeekPointFR = SeekPointFR + SeekSpeedFor;
                    trace
("After Seek Cal.: " + SeekPointFR);
                    myVid
.seek(SeekPointFR);
                   
if(SeekPointFR > ftime)
                   
{
                       
ForwardFlag=false;
                        myVid
.removeEventListener(Event.FRAME_CONSTRUCTED,OnExitFrame);
                   
}
               
}

           
}



   
}

I guess issue may be of buffer... i have set bufferTime to 30 sec.... for a 60 min video i get frame changed after 15-20 min video get played.. this is my guess.. plz help me out if anybody have idea.

Inspiring
March 27, 2012

show me the code.