EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - CHAPTER 3 Writing and Debugging Scripts

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
55
CHAPTER 3
Writing and Debugging Scripts
In Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004, you can write
scripts that are embedded in your FLA file or stored externally on your computer. (If you are
writing ActionScript 2.0 clas
s files, you must store each class as an external file that has the same
name as the class.) To write embedded scripts, use the Actions panel and attach the action to a
button or movie clip, or to a frame in the Timeline (see “Controlling when ActionScript runs
on page 56). To write external script files, you can use any text editor or code editor. In Flash
Professional, you can also use the built-in Script window. For more information, see “Using the
Actions panel and Script window” on page 58.
When using the ActionScript editor, you can also check syntax for errors, automatically format
code, and use code hints to help you complete syntax. In addition, the punctuation balance
feature helps you pair parentheses, braces, or brackets. For more information, see “Using the
ActionScript editor” on page 61.
As you work on a document, test it often to ensure that it plays as smoothly as possible and that it
plays as expected. You can use the Bandwidth Profiler to simulate how your document will appear
at different connection speeds (see Testing document download performance” in Using Flash
Help). To test your scripts, you use a special debugging version of Flash Player that helps you
troubleshoot. If you use good authoring techniques in your ActionScript, your scripts will be
easier to troubleshoot when something behaves unexpectedly. For more information, see
“Debugging your scripts” on page 68.

Table of Contents

Related product manuals