MX // Key holds

I got a question, say I use this command on a button:


on (keyPress "<Space>") {	
// whatever
}

and I want it to hold space, when you frist push it to hold it does the command, waits, then finnaly repeats like if you had a letter in this box, how could I make it so when i hold space, it doesnt delays to continously repeat the command?

Thanks
(-:

I guess you could use an onClipEvent (enterFrame) handler instead…
[AS]onClipEvent (enterFrame) {
if (Key.isDown(32)) {
// whatever
}
}[/AS]

perfect man thanks

No problem. :wink: