6 Replies Latest reply on May 3, 2006 2:43 PM by Newsgroup_User

    loading a quicktime file

    trilbymultimedia
      Hi

      I'm making a tool for our students to use to present some of their work back, would like them to be able to pick a quicktime file to play via a normal open dialog box. I guess I just need the dialog box to pass the file path back to the movie so I cn then just load up the file.

      Any ideas?

      Cheers
      B.
        • 1. Re: loading a quicktime file
          Level 7
          You can use the fileXtra4 Xtra's fx_FileOpenDialog() method to return
          the path of a chosen file.

          You can use Buddy API's baGetFileName() method to do the same thing.

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/
          • 2. Re: loading a quicktime file
            trilbymultimedia Level 1
            Thanks for that fx_FileOpenDialog is a pleasure to use and free!

            Cheers
            B.
            • 3. Re: loading a quicktime file
              trilbymultimedia Level 1
              OK so here's my script....

              on chooseMediaFile
              -- create new instance of xtra called gotPath
              gotPath = xtra("FileXtra4").new()
              -- open the dialog starting from the movie and look for MOV files
              gotPath.fx_FileOpenDialog("the moviepath", "MOV")
              --check a file has been chosen and set the member to the chosen file
              if gotPath <> "" then
              set the filename of member "presentation" to gotPath
              else
              alert "No file picked"
              end if
              -- display the path to the user
              put gotPath into field "MediaPath"
              -- reset gotpath
              gotPath = 0
              end

              Couple if problems, It won't let me select any files, even .mov ones. Clicking Cancel on the dialog returns "<Xtra child "FileXtra4" 4 195f2490>" which means my check for "" doesn't work as it contains something!
              • 4. Re: loading a quicktime file
                Level 7
                On Tue, 02 May 2006 16:48:03 GMT, trilbymultimedia posted in
                macromedia.director.lingo:

                > OK so here's my script....
                >
                > on chooseMediaFile
                > -- create new instance of xtra called gotPath
                > gotPath = xtra("FileXtra4").new()
                > -- open the dialog starting from the movie and look for MOV files
                > gotPath.fx_FileOpenDialog("the moviepath", "MOV")
                > --check a file has been chosen and set the member to the chosen file
                > if gotPath <> "" then
                > set the filename of member "presentation" to gotPath
                > else
                > alert "No file picked"
                > end if
                > -- display the path to the user
                > put gotPath into field "MediaPath"
                > -- reset gotpath
                > gotPath = 0
                > end
                >
                > Couple if problems, It won't let me select any files, even .mov ones.
                > Clicking Cancel on the dialog returns "<Xtra child "FileXtra4" 4
                > 195f2490>" which means my check for "" doesn't work as it contains
                > something!

                You need to set a variable to the return from the call. Something like this
                (untested):

                aFile = gotPath.fx_FileOpenDialog("the moviepath", "MOV")
                --check a file has been chosen and set the member to the chosen file
                if aFile <> "" then
                set the filename of member "presentation" to aFile
                else
                alert "No file picked"
                end if



                --
                Mark A. Boyd
                Keep-On-Learnin'
                • 5. Re: loading a quicktime file
                  trilbymultimedia Level 1
                  Thanks for that Mark, stupid mistake I know, that's what comes of trying to understand dot notation and failing!

                  The getting of the path now works fine, but I still can't get it to choose a mov file. JPEG works but only when first in the list

                  this works
                  JPEG/MOV/MPEG

                  this doesn't
                  MOV/MPEG/JPEG

                  oddness.
                  • 6. Re: loading a quicktime file
                    Level 7
                    On Tue, 02 May 2006 17:38:08 GMT, trilbymultimedia posted in
                    macromedia.director.lingo:

                    > The getting of the path now works fine, but I still can't get it to
                    > choose a
                    > mov file. JPEG works but only when first in the list
                    >
                    > this works
                    > JPEG/MOV/MPEG
                    >
                    > this doesn't
                    > MOV/MPEG/JPEG

                    Hmm, I just tested the following on a Windows box and it works for me. Did
                    you get the syntax correct for the filter?

                    -- watch out for word wrap!!!

                    gotPath = xtra("FileXtra4").new()

                    aFile = gotPath.fx_FileOpenDialog(the moviepath, "QuickTime Files/*.MOV/MPEG
                    Files/*.MPG/Image Files/*.JPG", "Choose a file to open", 0, 1)

                    gotPath = 0


                    --
                    Mark A. Boyd
                    Keep-On-Learnin'