6 Replies Latest reply on Jul 25, 2007 8:21 AM by eddiwil9

    Tempo/cue Point for WMV?

    eddiwill9
      I am working on a Director proj for Windows and am stumped. I seem to recall with QT I always used the tempo setting "Wait for Cue Point" but that doesn't appear to be an option for WMV files. I would like to not have to extend the WMV member all the way out down the timeline. Is there an fairly easy work-around to achieve this?

      Thanks!
        • 1. Re: Tempo/cue Point for WMV?
          Level 7
          You could to use lingo in the frameScript channel to monitor for
          currentTime = duration:
          --
          property wmvSprite
          property wmvDuration
          property bEnabled

          on isOKToAttach me, sType, sNum
          return (sType = #script)
          end

          on getPropertyDescriptionList
          lRange = []
          repeat with c = 1 to the lastChannel
          if sprite(c).member.type = #windowsMedia then lRange.append(c)
          end repeat
          pdl = [:]
          pdl[#wmvSprite] = [#comment: "WMV sprite channel:", #format:
          #integer, #default: 0, #range: lRange]
          return pdl
          end

          on beginSprite me
          bEnabled = 1
          wmvSprite = sprite(wmvSprite)
          tMember = wmvSprite.member
          if tMember.type <> #windowsMedia then
          bEnabled = 0
          exit
          end if
          wmvDuration = tMember.duration
          end

          on exitFrame me
          if bEnabled then
          if (wmvSprite.currentTime = wmvDuration) then
          tFrame = _movie.frame + 1
          else
          tFrame = _movie.frame
          end if
          _movie.go(tFrame)
          end if
          end
          • 2. Re: Tempo/cue Point for WMV?
            eddiwil9
            Sean, wow! Thanks... but I am not the most versed with Lingo.

            Do I simpy put the name of my wmv file somewhere in this section? Both places?

            wmvSprite = sprite(wmvSprite)
            tMember = wmvSprite.member

            Sorry to ask for more info; I really appreciate your response!
            • 3. Re: Tempo/cue Point for WMV?
              Level 7
              If you drop it into the frameScript channel it will automatically search
              for wmv sprites and present you with a list you can choose between.
              Assuming you have only one sprite referencing a #windowsMedia member in
              any given frame, you can accept the defaults and test it.
              • 4. Re: Tempo/cue Point for WMV?
                eddiwil9 Level 1
                Sean, Thanks again for your help-- you are very kind!

                I pasted the code into the frame channel, but I get a script error:

                Script error: Operand expected
                pdl[#wmvSprite] = [#comment: "WMV sprite
                channel:", #format: ?

                It's very likely I am doing something wrong, but my knowledge of Lingo is so lacking, I have no idea where to even begin! The curse of being a Lingo newb! :-)
                • 5. Re: Tempo/cue Point for WMV?
                  Level 7
                  > Script error: Operand expected
                  > pdl[#wmvSprite] = [#comment: "WMV sprite
                  > channel:", #format: ?

                  That error is due to a line-break introduced by the forum. Remove it and
                  recompile the script
                  • 6. Re: Tempo/cue Point for WMV?
                    eddiwil9 Level 1
                    Thanks! Will try it out again.