If you are uncomfortable writing ActionScript code or syntax, you might want to try using Script Assist mode in the Actions panel (Window > Actions). Script Assist is useful for creating scripts by making selections in the Actions panel and filling in text fields to automatically create statements in the Script pane. While you typically won’t use Script Assist for large applications, it is very useful for adding interactivity to your Flash applications, mocking up prototypes, and more.
Script Assist lets you build scripts by selecting items from the Actions toolbox, the list on the left side of the Actions panel. You can also select actions from the Add (+) pop-up menu. The Actions toolbox separates items into categories such as actions, properties, and objects, and also provides an index category that lists all items alphabetically. When you click an item once, its description appears at the upper right of the panel. When you double-click an item, it adds the item to the scrolling list on the right side of the panel in the Script pane.
In Script Assist mode, you can add, delete, or change the order of statements in the Script pane; you can also enter parameters for actions in text boxes above the Script pane. You can also use the standard Actions panel features while in Script Assist mode: you can find and replace text, view script line numbers, and pin a script—that is, keep a script in the Script pane when you click away from the object or frame.
To add an action to a Flash document, you must attach it to a button or movie clip, or to a frame in the Timeline. The Actions panel lets you select, drag and drop, rearrange, and delete actions.
Note: If the Actions panel contains ActionScript code when you click the Script Assist button, Flash validates the existing code. If there are errors in the code, you will not be able to use Script Assist until you fix (or comment out) the current code selection. For information on removing and manipulating scripts, see the following section of Flash LiveDocs: Using Flash > Writing ActionScript with Script Assist > Using Script Assist to Write ActionScript.
When Script Assist is enabled, the Actions panel user interface and behaviors change in the following ways:
For more information on adding, removing, and manipulating scripts using Script assist, see the following section of Flash LiveDocs: Using Flash > Writing ActionScript with Script Assist > Using Script Assist to Write ActionScript.
The Flash documentation (both in Flash Help and in LiveDocs) contains hands-on examples that show you how to use Script Assist. For an example of writing a script using Script Assist, see Using Flash > Writing ActionScript with Script Assist > Creating a startDrag/stopDrag Event Using Script Assist. For a tutorial that shows you how to build a small application using Script Assist, see Flash Tutorials > ActionScript: Use Script Assist Mode.