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

  • Home
  • SEARCH
  • 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 6752933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:06:07+00:00 2026-05-26T13:06:07+00:00

We have a flash game being developed in actionscript 3 and it runs much

  • 0

We have a flash game being developed in actionscript 3 and it runs much more slowly on our remote server.

The game specs:

  • 6-8 different movie clips, all 1 frame static png files from 10×10 to 100×100
  • anywhere from 10 to 60 instances of those MCs on screen at any given time
  • event loop is run from a flash Timer at 25ms
  • all interaction is via the keyboard

The strange thing is, we publish the swf file and run it locally and everything is fast. We copy the swf to a remote server and everything runs much more slowly. The music plays at normal speed, but the movieclips all move around the screen at about half speed.

Why would the file run differently when fetched from a remote server? Isn’t the swf always being run locally anyway? Also, we ran it locally and remotely with the task manager running and it does not seem to consume much CPU or memory.

EDIT: Ok, this is really weird. I added a framecounter textfield to the game. It reports the number of ms since the last timer tick. It consistently reports 50ms. My timer is clearly set to 25. This explains the half speed, but what explains this? I also added a check on the timer.Interval property to see if it had changed and it hasn’t; it’s still set to 25 while the game is running.

DOUBLE EDIT!: I found this article: http://www.bit-101.com/blog/?p=910, and switched my code to use ENTER_FRAME instead of timer, and it works. I get the full 40fps, give or take a few %. Still not sure what’s wrong with the timer though; if it was being delayed by the time spent in my loop it would fluctuate, but it doesn’t. It’s 50ms every time no matter how much is going on.

Here’s the code I’m using(more or less):

t = new Timer(25);
t.addEventListener(TimerEvent.TIMER, timerTick);
t.start();

and in the timer tick code I’m using getTimer() to clock the time between ticks. Comes out to 50ms every time.

  • 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-05-26T13:06:08+00:00Added an answer on May 26, 2026 at 1:06 pm

    I’ve had some problems with the Timer class before, using it to run my game loop. What’s the fps of your SWF? I’ve found the 2 of them to be linked.

    Previously, I thought I could use a SWF FPS of 2, while setting the Timer to give me 30FPS. What was happening was that the SWF would frame tick, it would check the Timer class. The timer might fire an event. Then, a half second later (the SWF was set to 2FPS), the SWF would tick again. The Timer class would then try to fire 15 events (Timer was set to 30FPS). There also seems to be a limit in the number of events it could fire at once as it would only ever fire 5 of them at a time.

    Switch to ENTER_FRAME – it also lets you throttle your frame rate if you need to.

    Also, if you’re not already using it, learn to use delta time to control the movement of your game objects.

    private var m_lastTime:int = 0;
    
    private function _onEnterFrame( e:Event ):void
    {
        var currTime:int        = getTimer();
        var deltaTime:Number    = ( currTime - this.m_lastTime ) * 0.001;
        this.m_lastTime         = currTime;
    
        // then, if you want your object to move at 10 pixels per second, it's:
        myObj.x += 10 * deltaTime;
    }
    

    Then, no matter the speed of your computer, your objects will move at a constant speed.

    If you’re making a physics game, then you’ll also need to think about fixing your timestep to get more consistent results: http://gafferongames.com/game-physics/fix-your-timestep/

    Bonus link: http://www.8bitrocket.com/2008/04/08/tutorial-creating-an-optimized-as3-game-timer-loop/

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

Sidebar

Related Questions

I have developed a simple interactive Flash game, but now it appears that sometimes
hey all, I have made a socket server in C# for a flash game
I monitor (and log to server) most user errors in our flash game. Quite
I have a Flash game I made way back in 2008. It runs super
I have little knowledge of Flash but for a little Flash game I have
I have been using custom swc based components for my new flash game. I
I am making a fighting game in Flash and while I have everything running,
I have a flash movie that runs fine in FF, Opera, Safari but not
I'm creating a flash rhythm game. I have a looping (at a certain frame
I'm making a game in flash, and I want to have a whole bunch

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.