Actionscript 3 Playing videos back to back with in a sequence with no break inbetween -
i'm wondering @ possiblitity of setting array of videos play play absolutely no pause in between? there anyway set there no way to have buffering or pause in between sequential playback? example:
import flash.events.netstatusevent; var videos:array = new array("ad01.flv", "ad02.flv", "ad03.flv"); var currentvideo:uint = 0; var duration:uint = 0; var ready:boolean = true; var nc:netconnection = new netconnection(); nc.connect(null); var ns:netstream = new netstream(nc); myvideo.attachnetstream(ns); ns.play(videos[currentvideo]); var listener:object = new object(); listener.onmetadata = function(evt:object):void { duration = evt.duration; ready = true; }; ns.client = listener; ns.addeventlistener(netstatusevent.net_status,nshandler ); function nshandler(evt:netstatusevent):void { if (ready && ns.time > 0 && ns.time >= (duration - 0.5)) { ready = false; currentvideo++; if (currentvideo < videos.length) { ns.play(videos[currentvideo]); } else { ns.removeeventlistener(netstatusevent.net_status, nshandler ); } } };
i'd break 1 video multiple parts , have play seamlessly back. i've tested above need know definitively.
one way embed videos timeline of separate swfs, , subload swfs, , play each timeline when needed after loads complete.
Comments
Post a Comment