1 Reply Latest reply on May 11, 2007 12:39 PM by Newsgroup_User

    tempo independent fps

    knew-bee
      Hi there,

      I'm looking for a bit of code that can ensure a precise frame rate on any computer. Something where I can set the tempo to 999 then adjust the frames per second through lingo.

      I've seen something on delta timing but that's applied to each sprite individually, I'd prefer to control the frame rate itself if possible.

      Thanks
        • 1. Re: tempo independent fps
          Level 7
          This might do the trick for you. Put it in a frame script or dummy sprite
          and stretch the span for the number of frames you want a particular frame
          rate, then do the same thing when you need to the frame rate to change.
          Then enter the frame durations in the property inspector.



          property pDuration, pStartTime

          on getPropertyDescriptionList me
          return [#pDuration: [#comment: "Enter frame duration in MS", #format:
          #integer, #default: 500]]
          end

          on beginSprite me
          pStartTime = the milliseconds
          end

          on exitFrame me
          if the milliseconds <= pStartTime + pDuration then
          go to the frame
          else
          pStartTime = pStartTime + pDuration
          end if
          end

          --
          Craig Wollman
          Lingo Specialist
          Word of Mouth Productions
          212-928-9581

          www.wordofmouthpros.com
          "knew-bee" <webforumsuser@macromedia.com> wrote in message
          news:f22bv4$bch$1@forums.macromedia.com...
          > Hi there,
          >
          > I'm looking for a bit of code that can ensure a precise frame rate on any
          > computer. Something where I can set the tempo to 999 then adjust the
          > frames per
          > second through lingo.
          >
          > I've seen something on delta timing but that's applied to each sprite
          > individually, I'd prefer to control the frame rate itself if possible.
          >
          > Thanks
          >
          >