3 Replies Latest reply on Nov 30, 2006 4:03 AM by shikozel

    MediaPlayback component

    Alok Jain
      Hi

      I am using MediaPlayback component to play audio and video files, these files are listed in a DataGrid.

      I want the MediaPlayback to play next song automatically when one is complete, How can i do this ?

      Thanks
        • 1. Re: MediaPlayback component
          Marghoob Suleman Level 1
          you must be using audio/video listener. You may play next song with the help of "onSoundComplete" method.
          • 2. MediaPlayback component
            shikozel Level 1
            Marghoob Sulemaan suggest a better solution I just dont know if flvPlayBack offer a video listener like onVideoComplete. if youfind this solution plz let me know

            other option:
            you can execute this script while the video is playing. you can probablly execute it every 1 second by setting set interval:


            script:

            var m = this.myVideo;
            if(!m.playing)
            {
            if(m.playheadTime) >= m.totalTime){
            trace("video ends! play the next one")
            }
            }
            • 3. Re: MediaPlayback component
              shikozel Level 1
              I found this post on "the flash blog":

              If you are using a Studio 8 FVLPlayback Component:

              Select your video/FVLPlayback Component on the timeline, and add the script below

              on (complete) {
              trace("end of video")
              }

              I am not a favor of this solution because I dont like to put my code on components nor on movie clip. but this is led me to believe that there is a video listener