EasyManua.ls Logo

MACROMEDIA FLASH 8-USING FLASH - Creating Custom Behaviors

MACROMEDIA FLASH 8-USING FLASH
678 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...
96 Using Symbols, Instances, and Library Assets
To add and configure a behavior:
1. Select the object, such as a button, that will trigger the behavior.
2. In the Behaviors panel (Window > Behaviors), click the Add (+) button and select the
desired behavior from the Movieclip submenu.
3. In the dialog box that appears, select the movie clip that you want to control with the
behavior.
4. Select a relative or absolute path.
For more information, see About absolute paths” on page 39 and About relative paths
on page 40.
5. If required, select or input settings for the behavior parameters and click OK.
Default settings for the behavior appear in the Behaviors panel.
6. Under Event, click On Release (the default event) and select a mouse event from the menu.
If you want to use the On Release event, leave the option unchanged.
Creating custom behaviors
You can write your own custom behaviors that serve your own needs. To do this, you create an
XML file that contains the ActionScript code needed to perform the desired behavior, and
save the file in the Behaviors folder of your local computer. Behaviors are stored in the
following location:
Windows: C:\Documents and Settings\user name\Local Settings\Application
Data\Macromedia\Flash 8\language\Configuration\Behaviors
Macintosh: Macintosh HD/Users/user name/Library/Application Support/Macromedia/
Flash 8/language/Configuration/Behaviors/
Before creating your own behaviors, examine the various Behavior XML files to develop an
understanding of the syntax of the XML files, as well as the ActionScript code used to create
behaviors. If you are new to writing behaviors, you should become familiar with the XML tags
used to create user interface elements (such as dialog boxes), and with ActionScript, the
coding language used to create behaviors. To learn about the XML used to create interface
elements, see Appendix B, “XML to UI.” To learn about ActionScript, see Learning
ActionScript 2.0 in Flash.
You can also download behaviors that other Flash users have created from the Macromedia
Exchange website. You can visit the Macromedia Exchange at: www.macromedia.com/devnet/
mx/flash/

Table of Contents

Related product manuals