1 Reply Latest reply on Jun 24, 2006 8:56 AM by James Newton, ACP

    Making a delay

    Level 7
      Dear all:

      I want to move a sprite (in a single frame) every second. How can I delay
      for this?

      many thanks


        • 1. Re: Making a delay
          James Newton, ACP Level 3
          There are a number of ways. One would be to create a behavior which creates a timeOut object which calls the behavior after 1000 milliseconds:

          on beginSprite(me)
          vTimeOut = timeOut().new("Unique Name", 1000, #moveSprite, me)
          end

          on moveSprite(me, aTimeOut)
          -- move your sprite
          end