Apply ActionScript syntax 229
4.
Click in the Script pane, at the end of the screen_mc text, and type
a period (
.
).
5.
When you type the period, code hints appear for the movie clip, because
you used the _mc suffix when naming the instance. Double-click
_visible
from the list of code hints, and type the following:
= false;
This line of code makes the screen_mc movie clip invisible on
the Stage.
Throughout authoring, remember to save your document frequently.
Apply ActionScript syntax
All languages, whether computer languages or written and spoken
“human” languages, follow specific rules that foster comprehension. These
rules are known as the language syntax.
Flash uses dot syntax, which means that the period (.) links parts of a
script. Other ActionScript syntax elements include the following:
■
A semicolon (;) in an ActionScript statement, like a period in an
ordinary sentence, indicates the end of a statement.
■
Parentheses () group arguments that apply to an ActionScript
statement.
■
Curly braces {} group related ActionScript statements. You can use
nested braces to create a hierarchy of statements.
Later in this lesson, you’ll use Flash features that allow you to test
your syntax.
NO
T
E
If code hints don’t appear, you don’t have code hints selected as a
preference in the Actions panel. You can type
_visible
directly in the
Script pane. You can also change your preferences by clicking the pop-up
menu in the upper-right corner of the Actions panel. From the pop-up
menu, select Preferences, and then select Code Hints on the ActionScript
tab.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Flash Tutorials...
Page 10: ...10 Contents...
Page 12: ...12 Introduction...
Page 42: ...42 Basic Tasks Creating a banner Part 1...
Page 78: ...78 Basic Tasks Creating a banner Part 3...
Page 88: ...88 Basic Tasks Create Accessible Flash Content...
Page 106: ...106 Basic Tasks Create an Application...
Page 116: ...116 Basic Tasks Use Layout Tools...
Page 124: ...124 Basic Tasks Create Symbols and Instances...
Page 134: ...134 Basic Tasks Add Button Animation and Navigation...
Page 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Page 192: ...192 Creating Graphics Applying Gradients...
Page 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Page 224: ...224 ActionScript Use Script Assist mode...
Page 268: ...268 ActionScript Work with Objects and Classes...
Page 270: ...270 Data Integration Overview Flash Professional Only...