|
Is splitting the 2
gig file up into smaller files an option for
you?
You could load the "chapters" of the 2 gig file into an array from an XML/SQL/text/or object source that contains the content paths. Then use the complete event to load the next clip in the array. You could wait until after the current clip has finished loading before loading the next clip (with an onLoadComplete event, not shown in code below) so that all the chapters are not downloaded at once. Does anyone know a way to clear a previous video from cache once it has been viewed? I just thought how that could be useful. Here is the code I used, you could adopt it for your application if you like: //defining the complete event actions for the clip //tracks current vid index _global.curVid=0; vidListener.complete = function(eventObject:Object):Void { _global.curVid++; //PageView... clip is location array of FLVs vids=PageView.componentsMC.vids; if(_global.curVid<PageView.componentsMC.vids.length){ //fade out last vid (using a movieclip prototype called cm_tween, definition not shown here) vids[_global.curVid-1].cm_tween('_alpha',100,0,5); //fade in current vid vids[_global.curVid].cm_tween('_alpha',0,100,5); //play current vid (when attached I set the property autoPlay=false) vids[_global.curVid].play(); } } //snippet from the for loop that attaches the clips. The initObj contains all the init properties //such as initObj.contentPath, initObj.autoPlay, etc... PageView.componentsMC.vids=[]; for(...){ clip = PageView.componentsMC.vids[i].attachMovie("FLVPlayback", initObj.name, i, initObj); clip.addEventListener("complete", vidListener); } I have had issues with the complete event being properly added to an FLV during conversion in Sorensen Squeeze. Most of the time the complete event is added fine but occasionally it comes up missing. I prefer using the Macromedia video encoder. |
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
