Copy link to clipboard
Copied
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)
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
...Copy link to clipboard
Copied
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);
}
}
Copy link to clipboard
Copied
Thank you for answers !!!!!!!!!!!!!!!!!!!
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now