4 Replies Latest reply on Jul 11, 2006 1:39 PM by Newsgroup_User

    Database Order of mpeg's

    mmhvp
      I need some help here please...
      I want to make a program with a lot of possible mpeg's to show.
      The program must start with a kind of database.
      I want the viewer to choose there (in advance) which mpegs he wants to see.
      After clicking (with a checkbox or something like that) for example 3 items,
      the program must run the 3 choosen mpeg's automatically following each other.
      Can anyone please help me with the script I need with this?
        • 1. Re: Database Order of mpeg's
          Level 7
          You need more than one script to create what you've outlined, and you
          are seemingly asking everyone here to create your application for you.

          Instead, try breaking your project down into manageable functional
          chunks and tackle them one at a time

          First you need a selectable list of MPEG files and then a way of not
          only selecting them, but ordering them too. Where are you going to
          source available files from? What sort of video member are you going to
          use to play these files? Are they MEPG 1, 2 or 4?

          Then you need ...
          • 2. Re: Database Order of mpeg's
            mmhvp Level 1
            I am sorry that it seems that I ask to create the whole application for me.
            That's not my intention.
            This is only a small part of a big program that is already setup, but I left al other information behind.
            Because it has nothing to do with the issue.

            The problem is that I don't know how to order the mpeg's after choosing en let them play following each other.
            The Mpeg-2 filess will be in a directory oin the hard-drive of the computer.
            • 3. Re: Database Order of mpeg's
              Level 7
              why do you need a DB? are you going to store some other info besides the
              video file names?

              if the answer is yes, then you need to decide wich DB depending on the
              target platform, budget, etc

              if the answer is no, then you can read the file names from the HD and
              store them in a list. that way you add/delete videos whenever you want.
              something like this:

              on beginSprite
              fileList = readFolder()
              ...
              end

              on readFolder
              fileList = []
              i = 1
              repeat while TRUE
              n = getNthFileNameInFolder(_movie.path & "videos", i)
              if n = EMPTY then exit repeat
              if n contains ".mpg" then
              fileList.append(n)
              end if
              i = i + 1
              end repeat
              return fileList
              end readFolder

              hth,

              jdoe


              mmhvp wrote:

              > I am sorry that it seems that I ask to create the whole application for me.
              > That's not my intention.
              > This is only a small part of a big program that is already setup, but I left
              > al other information behind.
              > Because it has nothing to do with the issue.
              >
              > The problem is that I don't know how to order the mpeg's after choosing en let
              > them play following each other.
              > The Mpeg-2 filess will be in a directory oin the hard-drive of the computer.
              >
              >
              • 4. Re: Database Order of mpeg's
                Level 7
                > The problem is that I don't know how to order the mpeg's after choosing en let
                > them play following each other.
                > The Mpeg-2 filess will be in a directory oin the hard-drive of the computer.

                A simple way to get a list of files in a directory is to use an xtra
                like Buddy API:
                lMPEGFiles = baFileList("folder", "*.mpg")

                Your end-user will need a licenced MPEG-2 decoder in order to view your
                video. Which cast member type are you using to play video?

                As far as ordering files you need to think about how to manage this in
                your interface. A common solution might be to drag and drop icons into
                slots indicating order, but it sounds like you haven't thought this
                process through thoroughly