dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: play mutiple .flv locally

  1. #1
    Senior Member
    Join Date
    Oct 2003
    Posts
    901

    play mutiple .flv locally

    hi, video noob here.

    I just open the source code for a flvplayer (made by someone else) first time today

    Does anyone know how alter the code so that it will play several .flv one after another (sort a like a playlist)?

    Here is the source code:

    // toggle for which file to play if none was set in html
    // you can change the 'test.flv' in your filename
    if(!_root.file) { file = 'video.flv' } else { file = _root.file; }
    Sorry if this is a dumb question. I am both noob on Video AND Coding

    Thanks

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Location
    London
    Posts
    361
    The code above will only allow you to specify a single video to play in the player.

    If you need to play a set of videos, one after the other, then the video player needs the ability to recognise when the video has finished.

    Attached is an FLA containing a demo of an FLV player which can be easily set up to play a sequence of videos.
    Attached Files Attached Files

  3. #3
    Senior Member
    Join Date
    Oct 2003
    Posts
    901
    hi, thanks a lot for the .fla

  4. #4
    Member
    Join Date
    Apr 2009
    Posts
    41
    I have a .mov file which I want to play in flvplayer component.
    But it doesnt do anything.
    Through help I have found that its property is 16bit integer(Big Endian), Mono, 22.050kHz, H.264, 1008*567, Millions .
    How to play that .mov file in flvplayer.
    The rest .mov file which I got plays fine in flvplayer component.
    Eg-AAC, mono, 44.100kHz, H.264, 1000*567, Millions.

    Any help ???

  5. #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