Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

To play video and again in reverse

Guest
Aug 04, 2015 Aug 04, 2015

I'm 'Import Video' - 'Embed FLV in SWF and play in timeline' was set up

To play video and again in reverse order (infinite loop)

00:01 - 00:02 - 00:03 - 00:02 - 00:01 (infinite loop)

TOPICS
ActionScript
470
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 04, 2015 Aug 04, 2015

convert the timeline to a movieclip (eg, flv_mc), attach a stop() to its first frame and use:

this.addEventListener(Event.ENTER_FRAME,playF);

function playF(e:Event):void{

flv_mc.nextFrame();

if(flv_mc.currentFrame==flv_mc.totalFrames){

this.removeEventListener(Event.ENTER_FRAME,playF);

this.addEventListener(Event.ENTER_FRAME,reverseF);

}

}

function reverseF(e:Event):void{

flv_mc.prevFrame();

if(flv_mc.currentFrame==1){

this.removeEventListener(Event.ENTER_FRAME,reverseF);

this.addEventListener(Event.ENTER_F

...
Translate
Community Expert ,
Aug 04, 2015 Aug 04, 2015

convert the timeline to a movieclip (eg, flv_mc), attach a stop() to its first frame and use:

this.addEventListener(Event.ENTER_FRAME,playF);

function playF(e:Event):void{

flv_mc.nextFrame();

if(flv_mc.currentFrame==flv_mc.totalFrames){

this.removeEventListener(Event.ENTER_FRAME,playF);

this.addEventListener(Event.ENTER_FRAME,reverseF);

}

}

function reverseF(e:Event):void{

flv_mc.prevFrame();

if(flv_mc.currentFrame==1){

this.removeEventListener(Event.ENTER_FRAME,reverseF);

this.addEventListener(Event.ENTER_FRAME,playF);

}

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 05, 2015 Aug 05, 2015

Thank you for answers !!!!!!!!!!!!!!!!!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 05, 2015 Aug 05, 2015
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines