actionscript key capture?
actionscript key capture?
- Started
- Last post
- 2 Responses
- benjackson
i'm having trouble getting a key down event with this code. all i'm trying to do is trace the Key.isDown() event:
_global.setTonic = function()
{
for (i=0; i<7; i++)
{
temp = 65 + i;
trace(Key.isDown(65 + i));
if (Key.isDown(temp))
{
...
}
}
}The function is called every frame:
onClipEvent(enterFrame) {
_global.setTonic();
}The problem is that it's only giving accurate keypress information for the first cycle of the frame... here's the output:
false
false
false
false
false
false
false
undefined
undefined
undefined
undefined
undefined
undefined
...
- benjackson0
nevermind... i fixed it myself.
- corin0
Show us what you did? it'll help when someone searches for a similar topic