A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: play mutiple .flv locally

Threaded View

  1. #5
    Banned
    Join Date
    Oct 2008
    Posts
    74
    Quote Originally Posted by Jujumon View Post
    hi, video noob here.
    Does anyone know how alter the code so that it will play several .flv one after another (sort a like a playlist)...
    You need to
    Code:
    import fl.video.*;
    and write a function and an array of flv videos to control the playback of the flv video array,
    Code:
    import fl.video.*;
    var myvideoarray:Array=new Array();
    myvideoarray[0] = "video1.flv";
    myvideoarray[1] = "video2.flv";
    myvideoarray[2] = "video3.flv";
    var k:Number = 0;
    myvideo.play(myvideoarray[k]);
    myvideo.addEventListener(VideoEvent.COMPLETE, loadnext);
    function loadnext(myevent:VideoEvent):void {
    k++;
    if (k>= myvideoarray.length) {
    k=0;
    }
    myvideo.play(myvideoarray[k]);
    }
    You can also do this without ActionScript, just check this article - http://www.playerdiy.com/configurati...ext-video.html
    Last edited by Stephanee; 08-18-2009 at 11:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center