• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 16. Debugging a Movie > Debugging with the ActionScript Editor

Debugging with the ActionScript Editor

The ActionScript editor has been updated in a number of ways to make it easier to use edit and debug scripts. When you're debugging a Flash movie, the traditional wisdom is to try to push it until it breaks, and then figure out why it broke. However, once you find out what's broke, it's very possible that you're going to have to work on the ActionScript's that drive the movie. That's where the Actions panel comes into play. The designers of Flash MX 2004, have added a few new editing and debugging features, as well as enhanced some old ones.

Use the ActionScript Editor

Word wrapping. Click the Options pop-up menu in the Script pane, to enable or disable word wrapping.

Viewing context-sensitive Help. When your pointer is positioned over an ActionScript element in the Actions toolbox or in the Script pane, you can click the Reference button in the context menu to display a help page about that element.

Importing scripts. When you select Import Script from the pop-up menu in the Actions panel, the imported script is copied into the script at the insertion point in the active code file.

Single-click breakpoints. To add a debugging breakpoint before a line of code in the Debugger panel or the Script pane of the Actions panel, click in the left margin.

Pinning multiple scripts. You can pin multiple scripts within a FLA file along the bottom of the Script pane in the Actions panel.

Script navigator. The Script navigator is a visual representation of the structure of your Flash (.fla) file; you can navigate through the file to locate the ActionScript code.

Integrated Script window for editing external files. (Flash Professional only). You can use the ActionScript editor in a Script window (separate from the Actions panel) to write and edit external script files.

Syntax coloring. Syntax coloring utilizes a user-defined set of colors to display the code entered into the Script pane. Click the Flash menu, and then click Preferences (Mac), or click the Edit menu, and then click Preferences. Click the ActionScript Preferences tab to modify the syntax coloring, font and size, or the scripting text.

Instant Syntax Checking. Click the Check Syntax button to get an instant evaluation of the current script.

Code Hint. Click the Show Code Hint button, and then Flash will give you a hint of what to do next.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint