MACROMEDIA FLASH 8-DEVELOPING FLASH LITE Develop Manual page 21

Developing flash lite applications
Hide thumbs Also See for FLASH 8-DEVELOPING FLASH LITE:
Table of Contents

Advertisement

6.
Type the following code in the Actions panel:
on(press) {
trace("You pressed Button 1");
}
on(release) {
trace("You released Button 1");
}
on(rollOver) {
trace("Button 1 has focus");
}
on(rollOut) {
trace("Button 1 lost focus");
}
7.
Drag another instance of the same button to the Stage and position it directly below the
first button.
8.
With the second button selected on the Stage, open the Actions panel and enter the
following code:
on(press) {
trace("You pressed Button 2");
}
on(release) {
trace("You released Button 2");
}
on(rollOver) {
trace("Button 2 has focus");
}
on(rollOut) {
trace("Button 2 lost focus");
}
9.
In the Timeline, select Frame 1 on the ActionScript layer.
10.
Type the following code in the Actions panel:
_focusRect = false;
This disables the yellow focus rectangle that Flash Lite draws around the button with
focus. In this case, the default focus rectangle is unnecessary because the button's contains
an Over state that is displayed when it has focus.
Handling button events (Flash Professional Only)
21

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-DEVELOPING FLASH LITE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents