Skip to main content
Participant
October 25, 2016
Question

Looping an externally loaded video - H.264

  • October 25, 2016
  • 2 replies
  • 10568 views

I would like to know if it is possible using AS3 to loop [ seamlessly or even slightly un-seamlessly! ] an externally loaded video - encoded as h.264

I have searched many leads trying to find out if this is currently viable. It doesn't seem as easy as I imagined it would be.

I have member of my team that knows some AS2 - and has very little knowledge of AS3. He wrote scripts for looping functionality in AS2 - however as we need to upgrade to Adobe Animate CC to use 4k video for a large touchscreen application - so we are trying to find out if looping video, loaded externally, can be scripted for in AS3.

It actually seems pretty crazy to me that such a feature is so hard to achieve. I would have thought that in today's media saturated world, this would be a basic and simple requirement.

If anyone can point me in the right direction I would be grateful. I need to determine whether to upgrade to Animate or to stay with CS5.5, and HD 1080p video.

This topic has been closed for replies.

2 replies

twistedmedia
Known Participant
May 14, 2018

The only way you can get a truly seamless video loop is to encode the video as FLV and play it from the timeline.

kglad
Community Expert
Community Expert
October 25, 2016

yes, you can loop (but not seamlessly).

how are you playing your video?  ie, are you using a flvplayback component, video component, as3 netstream?

GrayhemAuthor
Participant
October 25, 2016

we will do it any way that you suggest is best. In other words we are not doing it yet....
If you mean in AS2 however, we were doing it by a flvplayback component.

thanks for the reply BTW

kglad
Community Expert
Community Expert
October 25, 2016

use the flvplayback component with as3.  it's the easiest way to play video.

if your component has instance name, flv_pb you can use the following to loop:

flv_pb.addEventListener(fl.video.VideoEvent.COMPLETE,completeF);

function completeF(e:fl.video.VideoEvent):void{

flv_pb.play(path/filename);

}