Key.PGUP
Availability
Flash Player 5.
Usage
Key.PGUP:Number
Description
Property; constant associated with the key code value for the Page Up key (33).
Example
The following example rotates a movie clip called
Page Up keys.
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.PGDN)) {
car_mc._rotation += 5;
} else if (Key.isDown(Key.PGUP)) {
car_mc._rotation -= 5;
}
};
Key.addListener(keyListener);
Key.removeListener()
Availability
Flash Player 6.
Usage
Key.removeListener (listener:Object) : Boolean
Parameters
An object.
listener
Returns
If the
listener
successfully removed (for example, because the
the method returns
Description
Method; removes an object previously registered with
Example
The following example moves a movie clip called
The listener is removed when you press Escape, and
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
310
Chapter 6: ActionScript Core Classes
was successfully removed, the method returns
.
false
when you press the Page Down and
car_mc
. If the
true
was not on the Key object's listener list),
listener
Key.addListener()
using the Left and Right arrow keys.
car_mc
no longer moves.
car_mc
was not
listener
.
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?