List box question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    List box question

    Hello everyone-
    I'm trying to start up a .wmv movie from a List box but I don't know where to ask for the player?
    This is in mt text file:
    Video one::%Srcsys%\Media player.exe^%SrcDir%\video\vid1.wmv?????
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3971

    #2
    Re: List box question

    Why not use a File.Execute instead? That way it will open up in the End-User's favorite app that is registered to handle that particular file extension.

    Comment

    • Bruce
      Indigo Rose Customer
      • Jun 2001
      • 2134

      #3
      Re: List box question

      Ok... How would I use it in this line?
      Video one::%Srcsys%\Media player.exe^%SrcDir%\video\vid1.wmv?

      Comment

      • Bruce
        Indigo Rose Customer
        • Jun 2001
        • 2134

        #4
        Re: List box question

        ANYONE PLEASE...
        How would I play a .wmv video from a List box or as Worm suggested using the end users fav program?... But it must be from a List box.
        Video one::%Srcsys%\Media player.exe^%SrcDir%\video\vid1.wmv?????



        Comment

        • Worm
          Indigo Rose Customer
          • Jul 2002
          • 3971

          #5
          Re: List box question

          Before we get any further with this, let's figure out what exactly you want. Do you want to have the WMV play in an exrernal player? Or do you want to use the Media Player Object within AMS to play the WMV?

          If you want to play the video in an external player, then use the File.Execute to fire the WMV. Kinda like this:

          %SelectedIndex% = ListBoxObject[ListBox1].GetSelected
          %ItemData% = ListBoxObject[ListBox1].GetItemData (%SelectedIndex%)
          %NewString% = String.GetDelimitedString ("%ItemData%", "^", 1)
          File.Execute ("%NewString%", "", Continue)

          Cut and Paste Version


          To play the WMV in a Media Player Object, use this:
          %SelectedIndex% = ListBoxObject[ListBox1].GetSelected
          %ItemData% = ListBoxObject[ListBox1].GetItemData (%SelectedIndex%)
          %NewString% = String.GetDelimitedString ("%ItemData%", "^", 1)
          MediaPlayerObject[MediaPlayer1].Load ("%NewSting%")
          MediaPlayerObject[MediaPlayer1].Play

          Cut and Paste version

          Comment

          • CelticDragon
            Indigo Rose Customer
            • Jun 2003
            • 87

            #6
            Re: List box question

            I have a basic bit where a list box selection displays both a whole load of info in a web browser and a video at the same time....

            On double click of the list box the commands are:

            %SelectedIndex% = ListBoxObject[ListBox1].GetSelected
            %ItemData% = ListBoxObject[ListBox1].GetItemData (%SelectedIndex%)
            WebBrowserObject[WebBrowser1].NavigateTo ("%ItemData%")
            %ItemText% = ListBoxObject[ListBox1].GetItemText (Selected)
            MediaPlayerObject[MediaPlayer1].Load ("%SrcDir%\%ItemText%.mpg")
            MediaPlayerObject[MediaPlayer1].Play

            List looks like:
            Option 1::%SrcDir%\Option1.html
            Option 2::%SrcDir%\Option2.html

            and the videos are saved in distribution as option1.mpg and option2.mpg
            If you can read this, i have yet to write a witty and imaginative signature.... sorry...

            Comment

            • CelticDragon
              Indigo Rose Customer
              • Jun 2003
              • 87

              #7
              Re: List box question

              sorry, just realised you want it to play externally. The only thing I can think of is to run the video full screen from AMS.... I had designed a background where there was a specific frame for the video to sit over so I just had the program reload the same mediaplayer so the dimensions were the same....
              If you can read this, i have yet to write a witty and imaginative signature.... sorry...

              Comment

              • Bruce
                Indigo Rose Customer
                • Jun 2001
                • 2134

                #8
                Re: List box question

                Worm-
                how would my text.txt file read for my List Box?

                Comment

                • Worm
                  Indigo Rose Customer
                  • Jul 2002
                  • 3971

                  #9
                  Re: List box question

                  You really only need the Video Name, and the path to the video,

                  Video 1::%SrcDir%\Videos\Video1.wmv

                  of course if you do this, then you'll need to drop the section of code that does the delimited string actions. Simply use the %ItemData% for the path to the video.


                  Comment

                  • Bruce
                    Indigo Rose Customer
                    • Jun 2001
                    • 2134

                    #10
                    Re: List box question

                    Hummm. I'm getting an ERROR
                    "Could not play specific Media Player Object.
                    The media Player's state was incapatible with the action.
                    'MediaPlayer'

                    Just an FYI I may have more the one movie.
                    Any ideas?

                    Comment

                    • Worm
                      Indigo Rose Customer
                      • Jul 2002
                      • 3971

                      #11
                      Re: List box question

                      Take a look at this.

                      You'll need to edit the "WMV List.txt" file in the distribution folder, and put your WMVs in the WMV Folder to get it to work.

                      Download

                      Comment

                      • Bruce
                        Indigo Rose Customer
                        • Jun 2001
                        • 2134

                        #12
                        Re: List box question

                        Thx Worm!

                        Comment

                        • Worm
                          Indigo Rose Customer
                          • Jul 2002
                          • 3971

                          #13
                          Re: List box question

                          UR Welcome.

                          Comment

                          Working...
                          X