Martin Scott Goldberg wrote:
Ricky, thanks for the response but I don't see how a boolean variable
would help. I don't want to ignore key repeats, I want the pause after
the initial key press to go away and just start right in to the repeats.
In AS2 there was no pause, and in AS3 there there is.
You shouldn't rely on the interval of the KEY_DOWN to drive your game
logic. It's not reliable, as you are seeing. If you track the state of
the keys, you can check the state in your main game loop and do the
appropriate action every time the loop updates. Here's a very basic
example of what I'm talking about:
http://www.ryoshu.com/flashcoders/SimpleGame.as
By tracking key state in the game loop you have better control over what
your game objects do and when they do it.
-Ricky
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com