1 Reply Latest reply on Mar 23, 2007 3:55 PM by johnAq

    Pause/Play buttons

    juanissimo
      Hi,

      I'm new to Director and was trying to make two buttons: play and pause. I found a sample movie that contains the appropriate Lingo to add to the buttons.
      For Play:

      global gMovieState
      on mouseUp
      gMovieState=1
      end

      and for pause:

      global gMovieState
      on mouseUp
      gMovieState=0
      end

      However, simply attaching these to the buttons doesn't seem to be working. I assume that I'm missing a step in declaring a global variable. Also, how does Director know that "gMovieState=0" means loop in place and "gMovieState=1" mean to resume playing from the point of pause?

      Is there anyone who could help me make these buttons work? Any help would be greatly appreciated and could get you some great New Orleans music....

      Thanks,
      John Adams
      Orleans Parish 9-1-1






        • 1. Re: Pause/Play buttons
          johnAq Level 1
          This Lingo simply seys a global variable indicating whether the movie is in playmode or not. It does nothing to actualy start or stop the movie.

          To amke these work, place a sprite in stage that spans your entire movie and place his code in it

          global gMovieState
          on exitFrame me
          if gMovieState = 0 then
          go the frame --loop in place
          else
          --movie wil step onto next frame automatically
          end if
          end