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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:20:41+00:00 2026-05-26T09:20:41+00:00

I noticed that when programming a simple motion in ActionScript (e.g. object.x += 5)

  • 0

I noticed that when programming a simple motion in ActionScript (e.g. object.x += 5) that when a keyboard key is held down to cause the motion, a stutter is created in the appearance of the movement. Is there a way to remove this or to make it appear more fluent?

  • 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-26T09:20:41+00:00Added an answer on May 26, 2026 at 9:20 am

    Try something like this:

    stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
    stage.addEventListener(KeyboardEvent.KEY_UP, keyDown);
    someMC.addEventListener(Event.ENTER_FRAME, enterFrameUpdate);
    var isADown:Boolean = false;
    
    function keyDown(e:KeyboardEvent){
       if(e.keyCode == Keyboard.A){
           isADown = true;
       }
    }
    
    function keyUP(e:KeyboardEvent){
       if(e.keyCode == Keyboard.A){
           isADown = false;
       }
    }
    
    function enterFrameUpdate(e:Event){
        if(isADown){
             myMovieClip.x -= 3;
        }
    }
    

    Imports are:

    flash.events.KeyboardEvent;
    flash.events.Event;
    flash.ui.Keyboard;
    //and a few more
    

    Also increase the FPS of the swf if it’s still to jerky (but uniform) motion. Click on an empty part of the stage (main screen) and then CTRL-F3 or Properties screen and you should be able to change the FPS there.

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

Sidebar

Related Questions

I'm reading about functional programming and I've noticed that Pattern Matching is mentioned in
I'm reading a post about iPhone programming and I've noticed that the talk about
When reading about pipes in Advanced Programming in the UNIX Environment, I noticed that
This question may not directly relate to programming. I have noticed that the technology
I noticed that you can call Queue.Synchronize to get a thread-safe queue object, but
I've noticed while on my quest to lean functional programming that there are cases
I'm programming a GUI in my app and I noticed that button presses weren't
I've noticed that when I update my programming tools (packages) on Fedora using PackageKit,
I've noticed that there are awvully few programming tutorials in my native language (Latvian).
I have noticed that with iPhone programming you kind of need to retrieve your

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.