2

I would like to have one controller to sync and control multiple video objects(start/stop simultaneously). Is this possible?

neil
  • 21
  • 2

1 Answers1

1

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);
}
sberry
  • 128,281
  • 18
  • 138
  • 165
  • I just started working in as3 again after a while away and that map method is fantastic. Thanks! I just had trouble implementing it. This finally worked: public function playAll():void { var playVideo:Function = function(item:NetStream, index:int, vctr:Vector.):void { item.resume() }; myStreams.map(playVideo); } – neil Jan 24 '10 at 01:55