7 Replies Latest reply on Jun 11, 2007 7:05 AM by Newsgroup_User

    Digital Video Buttons

    Proddy2k
      I have a Digital Video element with buttons controlling it manually made. I want to create buttons to make the user go to the beginning of the video if they click on the << button and end of video if they click on the >> button. Any ideas how to do this the simplist way, I have tried to use pre-defined behaviors in Director but they dont work.

      Any help will be appreciated!

      Cheers!
        • 1. Re: Digital Video Buttons
          Level 7
          If you are using Quicktime for your video, then setting the currentTime
          property will do what you are asking

          If your video is in channel 1 and you want to send it to the beginning:

          sprite(1).currentTime=1

          You can get the time at end of the video by using duration, so this will
          send it to the end (I'm not real sure why you would ever want to send
          the video to the end, though...)


          sprite(1).currentTime=sprite(1).duration

          For more specifics on how to control digital video, check out the help
          file. On the Contents tab, go to the Director Scripting Reference, then
          Media Types, then Quicktime. It explains all of the different commands
          and properties.
          • 2. Re: Digital Video Buttons
            Proddy2k Level 1
            quote:

            Originally posted by: Newsgroup User
            If you are using Quicktime for your video, then setting the currentTime
            property will do what you are asking

            If your video is in channel 1 and you want to send it to the beginning:

            sprite(1).currentTime=1

            You can get the time at end of the video by using duration, so this will
            send it to the end (I'm not real sure why you would ever want to send
            the video to the end, though...)


            sprite(1).currentTime=sprite(1).duration

            For more specifics on how to control digital video, check out the help
            file. On the Contents tab, go to the Director Scripting Reference, then
            Media Types, then Quicktime. It explains all of the different commands
            and properties.



            I am using AVI Video Member, any ideas how to implement it for this video type?
            • 3. Re: Digital Video Buttons
              Level 7
              > I am using AVI Video Member, any ideas how to implement it for this video type?

              currentTime and duration will work for AVI too.

              regards
              Dean

              Director Lecturer / Consultant / Director Enthusiast
              http://www.fbe.unsw.edu.au/learning/director
              http://www.multimediacreative.com.au
              email: d.utian@unsw.edu.au

              • 4. Re: Digital Video Buttons
                Proddy2k Level 1
                quote:

                Originally posted by: Newsgroup User
                If you are using Quicktime for your video, then setting the currentTime
                property will do what you are asking

                If your video is in channel 1 and you want to send it to the beginning:

                sprite(1).currentTime=1

                You can get the time at end of the video by using duration, so this will
                send it to the end (I'm not real sure why you would ever want to send
                the video to the end, though...)


                sprite(1).currentTime=sprite(1).duration

                For more specifics on how to control digital video, check out the help
                file. On the Contents tab, go to the Director Scripting Reference, then
                Media Types, then Quicktime. It explains all of the different commands
                and properties.



                I added this to the button but nothing happens:

                on mouseup
                sprite(8).currentTime=1
                end

                Any ideas?
                • 5. Re: Digital Video Buttons
                  Level 7

                  Proddy2k wrote:

                  > I added this to the button but nothing happens:
                  >
                  > on mouseup
                  > sprite(8).currentTime=1
                  > end
                  >
                  > Any ideas?

                  I think 'currentTime' should work for AVIs. But, give 'movieTime' a try
                  instead and see how that goes. So:
                  sprite(8).movieTime=1

                  regards
                  Dean

                  Director Lecturer / Consultant / Director Enthusiast
                  http://www.fbe.unsw.edu.au/learning/director
                  http://www.multimediacreative.com.au
                  email: d.utian@unsw.edu.au


                  • 6. Re: Digital Video Buttons
                    Proddy2k Level 1
                    quote:

                    Originally posted by: Newsgroup User

                    Proddy2k wrote:

                    > I added this to the button but nothing happens:
                    >
                    > on mouseup
                    > sprite(8).currentTime=1
                    > end
                    >
                    > Any ideas?

                    I think 'currentTime' should work for AVIs. But, give 'movieTime' a try
                    instead and see how that goes. So:
                    sprite(8).movieTime=1

                    regards
                    Dean

                    Director Lecturer / Consultant / Director Enthusiast
                    http://www.fbe.unsw.edu.au/learning/director
                    http://www.multimediacreative.com.au
                    email: d.utian@unsw.edu.au





                    OK it works by taking it to the beginning of the movie but how can I take it to the end of the movie? I want it to be paused at the end of the movie as the one above takes it back to the start but plays it.
                    • 7. Re: Digital Video Buttons
                      Level 7
                      Proddy2k wrote:

                      > OK it works by taking it to the beginning of the movie but how can I take it
                      > to the end of the movie? I want it to be paused at the end of the movie as the
                      > one above takes it back to the start but plays it.

                      movieTime - position in vidoe
                      movieRate - playback speed where 1 is forward, -1 backward, 2 fast forward (2x)
                      and 0 is paused
                      duration - length of video

                      to go to end of video sprite 8 and pause
                      sprite(8).movieTime=sprite(8).duration
                      sprite(8).movieRate=0

                      QT generally goes to a movieRate of 0 when it gets to the end of the video. This
                      does not happen with AVI.

                      to play again from paused state
                      sprite(8).movieRate=1

                      regards
                      Dean

                      Director Lecturer / Consultant / Director Enthusiast
                      http://www.fbe.unsw.edu.au/learning/director
                      http://www.multimediacreative.com.au
                      email: d.utian@unsw.edu.au