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 class 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
.
Содержание FLASH MX 2004 - ACTIONSCRIPT
Страница 1: ...ActionScript Reference Guide...
Страница 8: ...8 Contents...
Страница 12: ......
Страница 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Страница 54: ...54 Chapter 2 ActionScript Basics...
Страница 80: ...80 Chapter 3 Writing and Debugging Scripts...
Страница 82: ......
Страница 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Страница 112: ......
Страница 120: ...120 Chapter 6 Using the Built In Classes...
Страница 176: ......
Страница 192: ...192 Chapter 10 Working with External Data...
Страница 202: ...202 Chapter 11 Working with External Media...
Страница 204: ......
Страница 782: ...782 Chapter 12 ActionScript Dictionary...
Страница 793: ...Other keys 793 221 222 Key Key code...
Страница 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Страница 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Страница 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Страница 816: ...816 Index...