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 6761337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:10:34+00:00 2026-05-26T14:10:34+00:00

Is there a way to natively enable frame skipping on Flash? When you develop

  • 0

Is there a way to natively enable frame skipping on Flash?

When you develop a game, you develop animations to match the pace of the gameplay, and do it on a target frame-rate (usually 24-40fps for Flash). But if the user’s computer is too slow, and cannot maintain the target frame-rate, Flash will automatically lower the fps, making the application play slowly.

If you use a time based logic, the frame based rendering will not match the time based logic, and things will be weird and there’ll be a lot of corner cases to work around.

I know by fact that some games use this sort of frame skipping logic, such as Popcap’s Zuma Blitz. Are they implementing the frame skipping on their own?

I cannot afford to implement this so late in the project unless I can somehow reimplement the MovieClip class and make it easily frame skipabble. Also, wouldn’t the overhead of controlling the animations on your own (overwriting Flash native MovieClip control) be too much of an overhead?

  • 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-26T14:10:34+00:00Added an answer on May 26, 2026 at 2:10 pm

    Okay, I realize that you’re not looking for the following ‘solution’, which won’t work, as all frames will still be played:

    stage.frameRate = new_frame_rate;
    

    The only solution is to just skip frames in your enterFrame callback:

    // Defined elsewhere.
    var current_frame:Number = 0;
    var frame_skip_factor:uint; // Skip one frame every 'x' frames.
    var is_frame_skip_active:Boolean;
    
    function on_enter_frame(event:Event):void
    {
       if ( is_frame_skip_active && current_frame++ % frame_skip_factor == 0) { return; }
    
       // Game logic/rendering code...
    }
    

    (assuming, per best practices, you’ve centralized game logic/animation in a single callback), but that may present race conditions/complications when any asynchronous callbacks are run.

    There is no way to actually skip frames at the runtime level; this is part of the contract of the AVM – no frames are skipped, all code is ran, no matter what. If performance is an issue, you might try asynchronous code execution. There are a couple of ways to do it:

    1) Offload some computing to Pixel Bender, so that it can be processed asynchronously and/or in parallel (http://www.adobe.com/devnet/flex/articles/flashbuilder4_pixelbender.html)

    2) Spread out the execution of lengthy operations over multiple frames (requires a state save and state restore, a la memento pattern). Details (and a great read) here: http://www.senocular.com/flash/tutorials/asyncoperations/

    In any case, I’d (first and foremost) recommend definitively identifying the performance bottleneck with a tool like the Flash Builder Profiler or the Stats class (Mr. Doob).

    Blitting might be the solution (create a spritesheet with a tile for each frame of the animation) as well. But in any case, I think what you’ll need to do is subclass MovieClip and override the play(), stop(), and gotoAndPlay() methods. Your class should look something like this:

    public class MyMovieClip extends MovieClip
    {
       override public function play():void
       {
          addFrameSkipListener();
    
          super.play();
       }
    
       override public function gotoAndPlay(frame:Object, scene:String = null):void
       {
          addFrameSkipListener();
    
          super.gotoAndPlay(frame, scene);
       }
    
       // ....
    }
    

    Where the frame skip listener will skip frames according to the current frame rate or frame time, if necessary. Naturally, you’ll also need to remove the frameSkipListener when the animation has reached an end.

    While the MovieClip override solution might do what you want on paper, if you have a lot of objects, this might actually degrade performance as the additional ENTER_FRAME listeners will add some overhead.

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

Sidebar

Related Questions

Is there any way python is natively, or through some code available online (preferably
Is there way in next piece of code to only get the first record?
is there way thats i can preselect an item when the page loads or
is there way how to get name ov event from Lambda expression like with
Is there way to better identify design pattern in source codes, esp. if you
Is there way to mute an audio stream or at least control the volume?
In PL/SQL Developer v7.1.x, is there way way to ignore large data types in
Is there a way to enforce constraint checking in MSSQL only when inserting new
Is there any way to check whether a file is locked without using a
Is there a way to find the name of the program that is running

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.