![MACROMEDIA FLASH 8-FLASH Скачать руководство пользователя страница 228](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958228.webp)
228 ActionScript: Write Scripts
Name button instances
Using the appropriate suffix to prompt code hinting, you’ll provide
instance names for two button instances that are already on the Stage.
1.
In the Timeline, unlock the Buttons layer.
2.
On the Stage, select the instance of play_button (the large green
button).
3.
In the Instance Name text box of the Property inspector, type
onButton_btn
to name the instance.
4.
On the Stage, select the instance of button_stop (the small red button).
5.
In the Instance Name text box of the Property inspector, type
offButton_btn
to name the instance.
Initialize the document
Applications have an initial state that specifies how the content first
appears to users. You initialize properties and variables in the first frame of
a document. You’ll specify that the map movie clip should not be visible
when the SWF file first plays.
1.
Select Frame 1 of the Actions layer. If the Actions panel isn’t open, select
Window > Actions.
Actions - Frame appears at the top of the panel, which indicates that
you selected a frame in which to apply ActionScript. It’s a good practice
to verify that you’re attaching ActionScript to the intended frame or
object.
The Actions panel includes a Script pane, the blank text entry area, in
which you can enter text directly; an Actions toolbox, which lets you
select ActionScript to add to your script; and a Script navigator, which
functions like the Movie Explorer.
2.
Along the top of the Actions panel, click Insert Target path.
3.
In the Insert Target Path dialog box, verify that Relative, meaning
relative path, is selected. From the hierarchical tree in the dialog box,
select
screen_mc
. Click OK.
A target path tells ActionScript the location of an object within the
overall structure of a document. For more information about paths, see
“Using absolute and relative target paths” in
Using Flash
.
Содержание FLASH 8-FLASH
Страница 1: ...Flash Tutorials...
Страница 10: ...10 Contents...
Страница 12: ...12 Introduction...
Страница 42: ...42 Basic Tasks Creating a banner Part 1...
Страница 78: ...78 Basic Tasks Creating a banner Part 3...
Страница 88: ...88 Basic Tasks Create Accessible Flash Content...
Страница 106: ...106 Basic Tasks Create an Application...
Страница 116: ...116 Basic Tasks Use Layout Tools...
Страница 124: ...124 Basic Tasks Create Symbols and Instances...
Страница 134: ...134 Basic Tasks Add Button Animation and Navigation...
Страница 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Страница 192: ...192 Creating Graphics Applying Gradients...
Страница 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Страница 224: ...224 ActionScript Use Script Assist mode...
Страница 268: ...268 ActionScript Work with Objects and Classes...
Страница 270: ...270 Data Integration Overview Flash Professional Only...