开发者

Synchronize the Playing of Multiple Video Files in Flash AS3

开发者 https://www.devze.com 2022-12-18 01:43 出处:网络
I would like to have one controller to sync and control multiple video objects(start开发者_如何学编程/stop simultaneously). Is this possible?I think I understand your question.If I do, the answer is y

I would like to have one controller to sync and control multiple video objects(start开发者_如何学编程/stop simultaneously). Is this possible?


I think I understand your question. If I do, the answer is yes.

You can have one class as act as the controller for several videos (FLVPlaybacks, JW Player, FlowPlayer)...

Essentially you would use your 1 controller to proxy any calls you would make so a single video to all of your videos. So you would have something like the following:

function play():void {
    for (var i:Number = 0; i < videos.length; i++) {
        videos[i].play();
    }
}

or even

function play():void {
    var playVideo:Function = function() { this.play() };
    map(playVideo, vides);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消