Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    58
    Thanks
    4
    Thanked 3 Times in 3 Posts

    video playlist with FLVplayback

    Hello all, I am trying to make a video playlist for FLVplayback in flash, but im getting stuck...

    basically i want to have the first video play (without clicking anything) then as soon as it finishes, i want the second video to start, once that has finished, the third video ect: once i get to the last video i want it to loop back to the first.

    so far i have this code (wrote myself)

    Code:
    /**
    FLVPlayback component on the Stage with an instance name of my_FLVPlybk
    */
    
    import mx.video.*;
    
    
    
    var first = "yes"
    
    if (first == "yes") {
    my_FLVPlybk.contentPath = "http://calumk.com/mini.flv";
    
    var first = "no";
    var lastplayed = "mini";
    }
    
    
    
    var listenerObject:Object = new Object();
    
    
    
    listenerObject.complete = function(eventObject:Object):Void {
    
            if (lastplayed == "mini") {
                
            my_FLVPlybk.contentPath = "http://ck/danjames/cloning.flv";
            
            var lastplayed = "clone";
            
            var listenerObject:Object = new Object();
            
            my_FLVPlybk.addEventListener("complete", listenerObject);
                
            }
            
            
            
      else if (lastplayed == "clone") {
                
            my_FLVPlybk.contentPath = "http://ck/danjames/whitenerd.mp4";
            
            var lastplayed = "whitenerd";
            
            var listenerObject:Object = new Object();
            
            my_FLVPlybk.addEventListener("complete", listenerObject);
            
                
            }
    }
    
    
    my_FLVPlybk.addEventListener("complete", listenerObject);
    when this is run the first video plays, followed by the second.. but then it stops after the second.....

    Hopefully you can see what i have tried to do....
    I play a video, mark it as being the last played, and therefor assign the next to play...,

    any advice (even a complete rewrite) would be helpfull..

    Thankyou
    Calumk

    p.s just to let you know some of the videos in this are hosted locally the "http://ck" redirects to my localhost , not ck.com

  • #2
    New Coder
    Join Date
    Jan 2009
    Posts
    58
    Thanks
    4
    Thanked 3 Times in 3 Posts
    unfortunatly thats no good.. i need to use the FLVPlayback component, and it has to be written in AS2, as i have an xml ticker thats as2 in the project...


    is there any way to do an FLVPlayback content array?


  •  

    Posting Permissions

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