As Code 2.0: script Editing and debugging

Source: Internet
Author: User
Tags exception handling versions word wrap
Script Flash MX Professional 2004 's Action scripting language has been upgraded to 2.0, and its editing and debugging tools have some improvements, so let's take a look at changes to the Action Script EditorAnd changes in code debugging


   changes in the Action Script Editor

The Flash MX Professional 2004 Action Script Editor has been updated in many ways to be more robust and easy to use. The major changes and functional improvements are as follows:

  Word Wrap
You can use the Options pop-up menu in the Script window, debugger panel, and output panel to enable or disable word wrap. You can also use the Action Panel pop-up menu to lock word Wrap. Keyboard shortcuts are control+shift+w (Windows) or command+shift+w (Macintosh).

  viewing context Sensitive Help
When you are in the Action Toolbox or in the Script window, place the mouse pointer over an action scripting language element, you can use the View Help option on the shortcut menu to display a help page for that element.


  Import Script
When you select the Import Script option on the pop-up menu of the action panel, the imported script is copied to the insertion point of your code file. In previous versions of Flash, the import script covered the contents of the heart-worrying script.

  Click Add Breakpoint
To add a debug breakpoint before a line of code in the debugger panel or in the Script window of the Actions panel, you can click at the left edge. In previous flash versions, clicking on the left border selects the line code. The new way to select a line of code is to control-click (Windows) or hold down command-click (Macintosh).


   no Normal mode and expert mode in the action panel
In previous flash versions, you could work in the normal mode of the action panel (in which you fill out parameters to create code) or Expert mode (in which you add commands directly to the Script window). In the Flash MX 2004 and Flash MX Professional 2004, you can only work in the actions panel by simply adding commands to the Script window. You can still use the drag method to drag commands from the Action Toolbox to the Script window, or use the plus (+) button above the Script window to add commands to the script.

  Lock multiple scripts
You can lock multiple scripts in a FLA file in the lower part of the Action Panel Script window. In previous versions of Flash, only one script could be locked at a time.

  Script Navigation bar
Now there are two windows to the left of the action panel: The Action Toolbox and the script navigation bar. The script navigation bar is a visual representation of the FLA file structure, where you can navigate the FLA file and locate the script code.

  

Edit an integrated script window for an external file: in the Flash Professional Edition, you can write and edit external script files using the Action Script Editor in the Script window (independent of the Action panel). The script window supports syntax coloring, encoding hints, and other preferences, and the Action Toolbox is also available. To display the Script window, select file>new (File > New), and then select the type of external file you want to edit. You can open multiple external files at the same time, and the file name appears in the tab at the top of the script window. (The label is displayed only on the Windows platform.) )

  
Ii. Changes in code debugging

  Change Output window to Output panel
Now you can move or dock the output panel in the same way as other panels in flash.

  Improve compile-time error reporting
In addition to providing more robust exception handling, Action scripting Language 2.0 provides a number of new compile-time errors.

  Improved exception handling
Error class and throw with Try ... Catch.. The finally command allows you to implement more robust exception handling.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.