Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:52:55+00:00 2026-06-05T14:52:55+00:00

I usually develop games using XNA and one of the common things to do

  • 0

I usually develop games using XNA and one of the common things to do when using XNA is to make sure that you update each entity based on ElapsedGameTime. This allows smooth movement even with a variable framerate.

I am looking for that functionality in AS3 using FlashDevelop.

So far I have come up with:

public function Update():void
{
    var currentTime:Number = getTimer();
    var elapsedTime:Number = currentTime - lastFrame;
    elapsedTime /= 1000;

    //use elapsedTime here for movement
    player.x += speed.x * elapsedTime

    lastFrame = getTimer();
}

With using this, I cannot really tell if it is actually working or not. I don’t really see the difference when I implement this.

Is this similar? Is there another way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:52:57+00:00Added an answer on June 5, 2026 at 2:52 pm

    It seems it would be possible that you see no difference in using this versus using an enter_frame handler if it’s the case it’s probably true that all the processing needed for a given frame is happening within the allotted time and it’s actually able to update at a smoothly at 1/24th of a second (default frameRate is 24). One way to test the difference would be to modify the frameRate property and see if the speed of your “character” is affected by the change in frameRate. You can also use a trace statement like trace(elapsedTime) you could also add an enter_frame event handler and keep track of the frames and trace that out as well to get better insight into how this is performing and what if any difference it’s making. This seems like a totally valid way to go though I haven’t done a lot of Flash game programming, in having a lot of experience with Flash RIA development I don’t see anything wrong with this method.

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/Application.html#frameRate

    if using pure AS3 you would set this using metadata on your main class like:

    http://flassari.is/2009/02/swf-metadata-in-pure-as3-projects/

    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf680e1-7ffe.html#WS4b4ddee4904fe7796d38fa291219d46bcb4-8000

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i usually develop for iPhone. But now trying to make a pong game in
I plan to develop a nice little application that will run on an arm-based
Usually I develop in Java but now I need to write an app that
usually i simply develop executable (.exe) files of my MATLAB codes by using this
I have two Macs that I develop from, one an iMac and one a
I develop a network based, multi-component software system that's designed to run on an
I've noticed something that happens in every app i develop. It's usually not a
In a Python system for which I develop, we usually have this module structure.
Usually when you use a UINavigationController you get a back button that has an
Usually I write a control loop as follows: Loop that enters writes ints into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.