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

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

Advertisement

9.
With the new text field still selected, do the following in the Property inspector:
a.
Select Dynamic Text from the Text Type pop-up menu.
b.
Type txt_status in the Instance Name text box.
The Stage should look something like the following image:
10.
In the Timeline, select Frame 1 in the layer named ActionScript.
11.
Open the Actions panel (Window > Actions) and enter the following code:
// Disable the focus rectangle because buttons have an over state
_focusRect = false;
btn_news.onRollOver = function() {
txt_status.text = "Press to select News"
}
btn_news.onPress = function() {
txt_status.text = "You selected News"
}
btn_sports.onRollOver = function() {
txt_status.text = "Press to select Sports";
}
btn_sports.onPress = function() {
txt_status.text = "You selected Sports";
}
btn_weather.onRollOver = function() {
txt_status.text = "Press to select Weather";
}
btn_weather.onPress = function() {
txt_status.text = "You selected Weather";
}
Handling key and button events (Flash Professional only)
25

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