Announcement

Collapse
No announcement yet.

playing media file in sequence in the SAME Media object

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • playing media file in sequence in the SAME Media object

    How can I do that? playing a second file after the first is easy (onendstream, load and play file2), but what about third, fourth...files?
    Thanks
    Yossi

  • #2
    Re: playing media file in sequence in the SAME Media object

    Finally an easy one. [img]/ubbthreads/images/icons/smile.gif[/img]

    1. Just create a media player object, let's call it "MP".
    2. plop all your avis into your dist folder, names them numerically, i.e. 1.avi, 2.avi, 3.avi, etc.
    3. Put an action on page 1 Initialize to set current movie to 1, i.e. %movie% = 1
    3. Put an action on MP's OnEndStream even which does two things:

    a) first it increments the movie count, i.e. %movie% = %movie% + 1
    b) it loads that movie into the media player, i.e. %SrcDir%/%movie%.avi (you could even set this up to work with multiple file extensions, or dynamic extensions, etc.)

    That's it, it'll daisy chain the movies perfectly.... use an IF conditional to sense when the movies are done, either dynamically or static, and then you can do a page jump or whatever once all the movies are done.


    If you want to take it a step further and make it work with normail filenames, multiple extensions, etc. just use a global list. This can even be done dynamically at runtime. i.e. it's simple to set up an app to read in a folder full of movie file names and then play through them in sequence.

    Heck you could veen do it with different sized movies too if you incorporate multiple sized hidden MP objects or even different pages with different sized MP for each possible frame size. The sky's the limit dude.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: playing media file in sequence in the SAME Media object

      Now THAT'S an answer! Corey, you and the other IR contributors on these forums (Brett, Lorne, et al.) are second to none when it comes to support. Above and beyond is all I have to say. Thank you.
      Eric Darling
      eThree Media
      http://www.ethreemedia.com

      Comment


      • #4
        Re: playing media file in sequence in the SAME Media object

        Global lists work very well for doing this. I had a project that played mp3s in the background for effect. It worked well in the fashion that Corey describes. I read a folder for all .mp3s upon startup place them in a global list then randomly get a position from the global list (not that you would want to do this). You may even want to have your global list prebuilt before you build your project that way you can have the videos in the order that you want. Once you get the position then you can load and play. And then OnStreamEnd, you will do a GlobalList.GetNext function, and then load and play the next on in list. I am hoping that my future projects will take me into the realm of video. Something I would like to learn, that and flash.

        If you want any sample projects, I could throw something together for you.
        TJ-Tigger
        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
        "Draco dormiens nunquam titillandus."
        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

        Comment


        • #5
          Re: playing media file in sequence in the SAME Media object

          Cool Tigg.

          Corey Milner
          Creative Director, Indigo Rose Software

          Comment

          Working...
          X