6 Replies Latest reply on Apr 6, 2009 2:27 PM by mwh71057

    pause QT with Spacebar

    mwh71057
      I want to pause a QT movie with the space bar, one click stops it, one click starts it. The script below only works while bar is being pressed. - Help!

      on enterFrame me
      sprite (1).movieRate = 1

      if _key.keyPressed(49) then

      if sprite (1).movieRate = 0 then
      sprite (1).movieRate = 1
      else
      if sprite (1).movieRate = 1 then
      sprite (1).movieRate = 0
      end if
      end if
      end if
      end

      Second question:
      If projector is made to a specific size ie 1024X768, is ther a way that the projector can shrink to a smaller size if played on a monitor of 800X600?
        • 1. Re: pause QT with Spacebar
          Level 7
          > I want to pause a QT movie with the space bar, one click stops it, one click
          > starts it. The script below only works while bar is being pressed. - Help!
          >
          > on enterFrame me
          > sprite (1).movieRate = 1

          -- remove the line above - you are effectively starting it every time
          #enterFrame fires

          > if _key.keyPressed(49) then
          >
          > if sprite (1).movieRate = 0 then
          > sprite (1).movieRate = 1
          > else
          > if sprite (1).movieRate = 1 then
          > sprite (1).movieRate = 0
          > end if
          > end if
          > end if
          > end



          > Second question:
          > If projector is made to a specific size ie 1024X768, is ther a way that the
          > projector can shrink to a smaller size if played on a monitor of 800X600?

          Read the docs for 'drawRect'
          • 2. Re: pause QT with Spacebar
            James Newton, ACP Level 3
            You can find a set of behaviors and a demo movie >here< which redimension the stage and resize and reposition sprites so that the movie fits a smaller screen.

            Note that the font size in text and field members will need to be adjusted, too.
            • 3. Re: pause QT with Spacebar
              Level 7
              just my 2 cents, but all this lines :

              >> if sprite (1).movieRate = 0 then
              >> sprite (1).movieRate = 1
              >> else
              >> if sprite (1).movieRate = 1 then
              >> sprite (1).movieRate = 0
              >> end if
              >> end if

              can be wrote :

              sprite (1).movieRate = not (sprite (1).movieRate)

              hth
              • 4. Re: pause QT with Spacebar
                mwh710@hotmail.com
                Wow, thanks for all of the help. I have one slight change, I misunderstood my boss. He wants to pause the "Director movie (projector)", not the QT movie with the space bar. Hit once for pause, once for start back up. Thanks again.
                • 5. Re: pause QT with Spacebar
                  mwh71057 Level 1

                  Thanks, but I tried the "fitMonitor script & put a small animation in it & it isn't working properly - see attachment

                   

                  If I don't put behavior on animation It animates, but doesn't scale.... Hmmmmmm

                   

                  thanks in advance

                  • 6. Re: pause QT with Spacebar
                    mwh71057 Level 1

                    OpenSpark - My problem with the "fitMonitor" is when I drop the behavior on a tween animation it doesn't work properly. If I don't drop the behavior on the animated sprite it works & sizes properly - except the anination doesn't .