SWiSH Player Support
Supported Internally
Syntax
A Mouse Event Parameter. Used as a parameter to on() and onSelfEvent() Event Handling functions.
Description
The associated Event is executed when the Event condition is met.
The Event condition requires the specified button to be pressed.
Apart from standard keyboard characters, non-printable characters can be selected via the pull-down Menu. The non-printable characters that are supported are:
Symbol
|
Entered as
|
Description
|
Space
|
"<Space>"
|
Space character
|
Left
|
"<Left>"
|
Left arrow
|
Right
|
"<Right>"
|
Right arrow
|
Up
|
"<Up>"
|
Up arrow
|
Down
|
"<Down>"
|
Down arrow
|
Home
|
"<Home>"
|
Home key
|
End
|
"<End>"
|
End key
|
PageUp
|
"<PageUp>"
|
Page Up key
|
PageDown
|
"<PageDown>"
|
Page Down key
|
Insert
|
"<Insert>"
|
Insert key
|
Delete
|
"<Delete>"
|
Del / Delete key
|
Backspace
|
"<Backspace>"
|
Backspace key
|
Tab
|
"<Tab>"
|
Tab key
|
Enter
|
"<Enter>"
|
Enter key
|
Escape
|
"<Escape>"
|
Esc key
|
Sample
The following Event script could be added to an Object / Sprite or button so that it gets larger after the button 'a' is pressed.
onSelfEvent (keyPress("a")) {
_xscale += 10;
_yscale += 10;
}
If multiple characters are to be tested, it is necessary to use multiple Event Handling functions.
onSelfEvent (keyPress("a")) {
_xscale += 10;
_yscale += 10;
}
onSelfEvent (keyPress("<Tab>")) {
_xscale += 10;
_yscale += 10;
}
See Also
dragOut, dragOver, press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().