on()
Availability
Flash Lite 1.0.
Usage
on(event) {
// statement(s)
}
Operands
The instructions to execute when
statement(s)
This trigger is called an event. When a user event occurs, the statements following it
event
within curly braces (
{}
parameter:
event
The button is pressed while the pointer is over the button.
press
The button is released while the pointer is over the button.
release
The pointer rolls outside the button area.
rollOut
The pointer rolls over the button.
rollOver
keyPress "key"
specify a key code or key constant.
Description
Event handler; specifies the user event or keypress that triggers a function. Not all events
are supported.
Example
The following code, which scrolls the
8 key, tests against
maxscroll
on (keyPress "8") {
if (myText.scroll < myText.maxscroll) {
myText.scroll++;
}
}
) execute. Any of the following values can be specified for the
The specified key is pressed. For the key portion of the parameter,
myText
before scrolling:
occurs.
event
field down one line when the user presses the
on()
33
Need help?
Do you have a question about the FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?