6 Replies Latest reply on Jun 14, 2007 9:14 AM by Applied CD

    Video Playback

    Yue_Hong Level 1
      Is there anyway to know when is the video playback is done?
        • 1. Re: Video Playback
          Level 7

          What kind of video?

          For quicktime, you can compare the sprite's movieTime with the member's
          duration. If equal, it's done playing.

          For other video formats (I prefer quicktime in Director above all) check
          the help files (which sometimes are a bit disheartening...).

          HTH,
          Manno

          Yue_Hong wrote:
          > Is there anyway to know when is the video playback is done?

          --
          ----------
          Manno Bult
          http://www.aloft.nl
          • 2. Re: Video Playback
            Yue_Hong Level 1
            Yeah, my video is in QuickTime format, but I only want it in 1 frame only during playback. So, is there some code like (sound(1).status=0) to detect it has stop playing?
            • 3. Re: Video Playback
              Level 7

              No. like I said, you'd have to compare the movieTime with the duration:

              if ( sprite(n).movieTime = sprite(n).member.duration ) then
              -- it is finished playing.

              Or use the tempochannel if coding ain't your thing. IIRC (not behind
              Director right now) it should be able to check for videoplayback being
              finished.
              The tempochannel is pretty rigid in the sense that it halts filmloops
              playback an a lot of script interactivity.

              Manno

              Yue_Hong wrote:
              > Yeah, my video is in QuickTime format, but I only want it in 1 frame only during playback. So, is there some code like (sound(1).status=0) to detect it has stop playing?

              --
              ----------
              Manno Bult
              http://www.aloft.nl
              • 4. Re: Video Playback
                Level 7
                It's best to store the duration in a propery or other variable so that the
                Quicktime movie isn't constantly polled eachtime the member duration is
                needed.


                --
                Craig Wollman
                Lingo Specialist
                Word of Mouth Productions
                212-928-9581

                www.wordofmouthpros.com
                "Manno Bult" <manno@aloft.nl> wrote in message
                news:f4r20q$nsq$1@forums.macromedia.com...
                >
                > No. like I said, you'd have to compare the movieTime with the duration:
                >
                > if ( sprite(n).movieTime = sprite(n).member.duration ) then
                > -- it is finished playing.
                >
                > Or use the tempochannel if coding ain't your thing. IIRC (not behind
                > Director right now) it should be able to check for videoplayback being
                > finished.
                > The tempochannel is pretty rigid in the sense that it halts filmloops
                > playback an a lot of script interactivity.
                >
                > Manno
                >
                > Yue_Hong wrote:
                >> Yeah, my video is in QuickTime format, but I only want it in 1 frame only
                >> during playback. So, is there some code like (sound(1).status=0) to
                >> detect it has stop playing?
                >
                > --
                > ----------
                > Manno Bult
                > http://www.aloft.nl


                • 5. Re: Video Playback
                  Level 7
                  true :)

                  forum.macromedia.com wrote:
                  > It's best to store the duration in a propery or other variable so that the
                  > Quicktime movie isn't constantly polled eachtime the member duration is
                  > needed.
                  >
                  >

                  --
                  ----------
                  Manno Bult
                  http://www.aloft.nl
                  • 6. Re: Video Playback
                    Applied CD Level 1
                    We exclusively use mpg & wmv (and very rarely avi) with MPEG Advance xtra and I’ve notice that there are some (rare) video clips where movieTime never actually reaches duration. To avoid having our projects loop forever waiting for an end that never comes we incorporate a little “slop” into the conditional, just to be safe, ie: sprite(n).movieTime <= sprite(n).member.duration-200 ... at 30fps you'll loose at most 6 frames from the end of the video.