Announcement

Collapse
No announcement yet.

Playing videos in a row

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

  • Playing videos in a row

    Hi all,

    I'm new here, as I'm new to Media Studio.

    And so here's my first problem:

    I have a video tutorial project going on with ten lessons, and for each lesson there is a button.

    Great. Now, what I want is to push button 1, and have the media player to show me all videos from 1 to 10, one after the other.

    When pushing button 2, same thing: all avi files from 2 up to 10.

    And so on. You get the picture.

    How can I do this?


    Thanks,

    renderizer

  • #2
    Re: Playing videos in a row

    How are you defining the names of the videos? Are you putting them in a Global List, a Variable, or what?

    There are so many ways to do things in AMS, if you shed some light on the questions above, it'll be easier to give you a solution that is appropriate to the task.

    Comment


    • #3
      Re: Playing videos in a row

      Hi Worm!

      Well, since this is my first project I took the most simple route and hooked every button to a load/play video action.

      I don't know too much of the way I have to set up lists and variables, and how to access them. I'm afraid you have just collided with a BLOODY beginner. ;->

      The guy I'm sharing my flat with (I'm just sitting at his computer) has been using AMS for quite some time now, but at the moment he is off to New Zealand (might be doing some kind of weird bungee jump in this moment), so I can't ask him and have to bother you instead. Sorry.

      Yet I'd be glad if you could share your wisdom with me.

      Thx anyway,

      Renderizer

      Comment


      • #4
        Re: Playing videos in a row

        Okay. If you are defining the filename, it'd be easiest to put them in a Global List. Using a While loop in each buttons click event, you could start out at the current placement and move next until you reach the end of the list.

        Or

        Rename all your videos to have the corresponding number to its place in the sequence at the end (ie. video1.mpg)

        In each button, set a variable to the CurrentPos, then set up a while loop to go through the videos. Increment the CurrentPos at the end of the loop and use the counter as part of the video name (i.e. video%CurrentPos%.mpg), bail out when %CurrentPos% is greater than the number of videos.

        Comment


        • #5
          Re: Playing videos in a row

          Hi Worm!

          Thanks for all the tips. I'll see what I can do about it.

          Pretty flexible software...jeez! [img]/ubbthreads/images/icons/laugh.gif[/img]


          CYA

          Renderizer

          Comment


          • #6
            Re: Playing videos in a row

            Ok. I defined a global list containing the names of all the videos,looping through the items from '# of Button' to 'end of list'.

            The problem I'm facing now is:

            How do I tell AMS to wait for the current video to finish?
            As it is now, it loops through the entire list at once, which is not very useful... [img]/ubbthreads/images/icons/wink.gif[/img]

            Thanks for your help,

            Renderizer

            Comment


            • #7
              Re: Playing videos in a row

              Ok. I got it working.

              This is what I did:

              On End of Stream

              IF (%VideoButton% < 9)
              (%VideoButton%=Evaluate(%VideoButton%+1)
              %CurrentItem%=GlobalList(PlayList),GetItem(%VideoB utton%)
              MediaPlayerObject(MediaPlayer1),Load("%CurrentItem %")
              MediaPlayerObject(MediaPlayer1),Play
              ELSE
              MediaPlayerObject(MediaPlayer1),Stop

              Where VideoButton contains the number of the selected video (0-9).

              Not very elegant I suppose, but for someone whose last scripting experience took place in the mid-80s... [img]/ubbthreads/images/icons/wink.gif[/img]

              But if you have a shorter way of doing it, let me know please!


              Renderizer

              Comment


              • #8
                Re: Playing videos in a row

                Hey Worm, isn't this exactly what you just did for me? Check the easy newbie question thread.

                Comment

                Working...
                X