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

Actionscript language reference
Table of Contents

Advertisement

MovieClip.onKeyUp

Availability
Flash Player 6.
Usage
my_mc.onKeyUp = function() {
// your statements here
}
Parameters
None.
Returns
Nothing.
Description
Event handler; invoked when a key is released. The
parameters. You can use the
key was pressed. You must define a function that executes when the event handler is invoked. You
can define the function on the Timeline or in a class file that extends the MovieClip class or is
linked to a symbol in the library. For more information, see "Assigning a class to a movie clip
symbol" in Using ActionScript in Flash.
The
event handler works only if the movie clip has input focus enabled and set. First,
onKeyUp
the
MovieClip.focusEnabled
must be given focus. This can be done either by using
Tab key to navigate to the clip.
If
Selection.setFocus()
Selection.setFocus()
is moved.
Example
The following example defines a function for the
the Output panel:
my_mc.onKeyUp = function () {
trace ("onKeyUp called");
};
The following example sets input focus:
my_mc.focusEnabled = true;
Selection.setFocus(my_mc);
See Also
MovieClip.onKeyDown
and
Key.getAscii()
property must be set to
is used, the path for the movie clip must be passed to
. It is very easy for other elements to take the focus back after the mouse
event handler is invoked with no
onKeyUp
methods to determine which
Key.getCode()
for the movie clip. Then, the clip
true
Selection.setFocus()
method that sends a
onKeyUp
or by setting the
action to
trace()
MovieClip.onKeyUp
557

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents