Key.onkeyup - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Key.onKeyUp

Availability
Flash Player 6.
Usage
keyListener.onKeyUp
Description
Listener; notified when a key is released. To use
can then define a function for
Key object, as shown in the following example:
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
trace("DOWN -> Code: "+Key.getCode()+"\tACSII: "+Key.getAscii()+"\tKey:
"+chr(Key.getAscii()));
};
keyListener.onKeyUp = function() {
trace("UP -> Code: "+Key.getCode()+"\tACSII: "+Key.getAscii()+"\tKey:
"+chr(Key.getAscii()));
};
Key.addListener(keyListener);
Listeners enable different pieces of code to cooperate because multiple listeners can receive
notification about a single event.
See also
Key.addListener()
362
Chapter 2: ActionScript Language Reference
onKeyUp,
and use
onKeyUp
addListener()
you must create a listener object. You
to register the listener with the

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents