, August 07, 2007 7:36 AM
Subject: SPAM(6.0) [Flashcoders] Key repeating in AS3?
Has anyone noticed a change in key repeating rate (i.e. when the key is
held down) between as3 and as2?
I just transfered some game code over to as3 for controlling a ship. I.E.
left arrow to turn left, right arrow
Martin Scott Goldberg wrote:
I need to get rid of that pause in between the initial keypress and the
repeat so I have a smooth control like I had in as2. Anyone have any
insight?
The event model has changed quite a bit, but I think you are dealing
with an architecture issue. You should set
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.
Marty
Martin Scott
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
Ricky - you were 100% correct and I bow to your insight. ;)
Thanks for the help, worked out a version based on your example.
Marty
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
Has anyone noticed a change in key repeating rate (i.e. when the key is
held down) between as3 and as2?
I just transfered some game code over to as3 for controlling a ship. I.E.
left arrow to turn left, right arrow to turn right.
In as2 the key starts repeating really quick when held down. In
6 matches
Mail list logo