56
Writing and Editing ActionScript 2.0
To check for punctuation balance,
do one of the following:
■
Click between braces ({}), brackets ([]), or parentheses [()] in your script.
■
For Windows, press ' (single quote), or for Macintosh, press ' (single
quote) to highlight the text between braces, brackets, or parentheses.
The highlighting helps you check that opening punctuation has corresponding closing
punctuation.
Importing and exporting scripts
You may both import a script into the Actions panel or Script window and export your scripts
to external ActionScript files. Both can be useful for sharing code between different Flash
applications and development teams.
To import an external AS file:
■
To import an external script into a script that you’re working on in the Script pane, place
the insertion point where you want the first line of the external script to be located and
then do either of the following:
■
In the Actions panel, select Import Script from the pop-up menu or press
Shift+I (Windows) or Shift+I (Macintosh).
■
In the Script window, select Import Script from the File menu or press
Shift+I (Windows) or Shift+I (Macintosh).
You can export a script from the Actions panel. When you use the Script window, exporting is
unnecessary because you can instead save the AS file.
To export a script from the Actions panel:
1.
Select the script to export and then select Export Script from the pop-up menu or press
Shift+X (Windows) or Shift+X (Macintosh).
The Save As dialog box appears.
2.
Save the ActionScript (AS) file.
Flash supports a number of different character encoding formats (including Unicode) and you
may specify which format to use when importing and exporting scripts. For more
information, see
“Importing and exporting scripts” on page 56
and
“Import and export
preferences” on page 57
.
Summary of Contents for FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Page 1: ...Learning ActionScript 2 0 in Flash...
Page 8: ...8 Contents...
Page 18: ...18 Introduction...
Page 30: ...30 What s New in Flash 8 ActionScript...
Page 66: ...66 Writing and Editing ActionScript 2 0...
Page 328: ...328 Interfaces...
Page 350: ...350 Handling Events...
Page 590: ...590 Creating Interaction with ActionScript...
Page 710: ...710 Understanding Security...
Page 730: ...730 Debugging Applications...
Page 780: ...780 Deprecated Flash 4 operators...
Page 830: ...830 Index...