3 Replies Latest reply on Mar 24, 2007 12:11 AM by Newsgroup_User

    pausing a film loop

    Level 7
      About a week and a half ago, I asked if a film loop can be paused (in
      this forum) and was told to try something like the following :
      tell sprite(x) to go to the frame - 1

      I tried
      on mouseUp me
      tell sprite(me.spriteNum) to go the frame - 1
      end

      That did not work.

      Is there any other way to pause a film loop?

      Thanks.

        • 1. Re: pausing a film loop
          johnAq Level 1
          Mediamacros have a behavior that can control film loops.

          http://www.mediamacros.com/item/item-956198062/

          It's pre-MX2004 Lingo, but should at leasr give you a good start point

          hth

          johnAq
          • 2. Re: pausing a film loop
            Level 7
            Add the following to a behavior script and attach it to your filmLoop.
            Once done, you can send messages to the filmLoop like:
            sendAllSprites(#mSetPaused, TRUE)
            to pause it and:
            sendAllSprites(#mSetPaused, FALSE)
            to start it again.
            --
            property spriteNum
            property my
            property myMember
            --property frameCount
            property bPaused


            on beginSprite me
            my = sprite(spriteNum)
            myMember = my.member
            bPaused = FALSE
            -- tell my to frameCount = the lastFrame
            end


            on exitFrame me
            if bPaused then
            tell my to go to the frame - 1
            end if
            end


            on mSetPaused me, isPaused
            bPaused = isPaused
            end
            • 3. Re: pausing a film loop
              Level 7
              Thanks JohnAQ and Sean.

              Sean - I tried your behavior. The problem is that it pauses in the frame
              of the score, I want just the film loop to pause. I actually have
              multiple film loops playing together. So, your behavior will pause all of
              them (even if the behavior is just atached to one).

              johnAq - do you know anything more about the mediamacros behavior? It's
              very complex (for me) and so I can't work out how to pause it. I tried
              adding the folloiwng to the bottom of the behavior:
              on mouseUp
              set state = #playing
              loopTimes = 1
              end

              That actually did pause the film loop but it played it until the end of
              the loop then stopped. i want it to pause at the place you click it.

              Thanks.