Skip to main content
Participant
March 2, 2016
Question

Loop flv in Animate

  • March 2, 2016
  • 1 reply
  • 987 views

Hello everybody,
I've a question about how is possible put in loop a flv in Animate?
I tryed like that:

  • Import a movie *.mov into library
  • add in a level that code As3

import fl.video.VideoEvent;

myVideo.addEventListener(

VideoEvent.COMPLETE, completePlay);

function completePlay(e:VideoEvent):void {

myVideo.play();

}

import fl.video.VideoEvent;

fl_video.autoRewind = true; // fl_video being the name of the video component

fl_video.addEventListener(VideoEvent.AUTO_REWOUND, doLoop);

function doLoop(e:VideoEvent):void

{

e.target.play();

}

  • named a movie in propriety: myVideo

but don't work!

Thanks in advance for your help!!!

Cheers

Giulio

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
March 3, 2016

if you want your mov on a timeline, just loop the timeline that contains the video.

Participant
March 3, 2016

Thanks Kglad for your reply,

but when I import my video (mov) on Animate the istance is a FLVPlayback and if a drag the in stage is one frame, so start the movie and stop without the loop.
How is possible with a command As3 create the loop?


Thanks in advance

Giulio

kglad
Community Expert
Community Expert
March 3, 2016

assign your flbplayback instance and instance name (in the properties panel), eg, flv_pb.

you can then use:

flv_pb.addEventListener(Event.COMPLETE,completeF);

function completeF(e:Event):void{

flv_pb.seek(0);

flv_pb.play();

}