MACROMEDIA FLASH 8-DEVELOPING FLASH LITE 2.X Develop Manual page 22

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

Advertisement

2.
Select Window > Common Libraries > Buttons to open an external library of prebuilt
button symbols.
3.
In the Library panel, double-click the classic buttons folder to open it, and then open the
Circle Buttons folder.
4.
Drag an instance of the Menu button symbol to the Stage.
5.
In the Property inspector, in the Instance Name text box, type btn_1.
6.
Drag another instance of the same button to the Stage and position it directly below the
first button.
7.
In the Property inspector, in the Instance Name text box, type btn_2.
8.
In the Timeline, select Frame 1 in the layer named ActionScript.
9.
Open the Actions panel (Window > Actions) and enter the following code:
// Disable the focus rectangle because buttons have an over state
_focusRect = false;
// Event handlers for btn_1
btn_1.onPress = function() {
trace("You pressed Button 1");
}
btn_1.onRelease = function() {
trace("You released Button 1");
}
btn_1.onRollOver = function() {
trace("Button 1 has focus");
}
btn_1.onRollOut = function() {
trace("Button 1 lost focus");
}
// Event handlers for btn_2
btn_2.onPress = function() {
trace("You pressed Button 2");
}
btn_2.onRelease = function() {
trace("You released Button 2");
}
btn_2.onRollOver = function() {
trace("Button 2 has focus");
}
btn_2.onRollOut = function() {
trace("Button 2 lost focus");
}
22
Creating Interactivity and Navigation

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents