Adobe 38039336 - Flash CS3 Professional User Manual page 233

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

Select the movie clip to control with the behavior.
3
Select a relative or absolute path.
4
If required, select or input settings for the behavior parameters and click OK. Default settings for the behavior
5
appear in the Behaviors panel.
6
Under Event, click On Release (the default event) and select a mouse event from the menu. To use the On Release
event, leave the option unchanged.
See also
"About relative paths" on page 73
"About absolute paths" on page 72
Create custom behaviors
To write custom behaviors, create an XML file that contains the ActionScript 2.0 code 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\Adobe\Flash
CS3\language\Configuration\Behaviors
• Macintosh: Macintosh HD/Users/user name/Library/Application Support/Adobe/Flash CS3/language/Configu-
ration/Behaviors/
Before you create your own behaviors, examine the 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, famil-
iarize yourself with the XML tags used to create user interface elements (such as dialog boxes), and with Action-
Script, the coding language used to create behaviors. To learn about the XML used to create interface elements, see
Extending Flash. To learn about ActionScript, see Programming ActionScript 3.0 or Learning ActionScript 2.0 in
Adobe Flash.
You can also download behaviors that other Flash users have created from the Adobe Flash Exchange website. You
can visit the Adobe Exchange at: www.adobe.com/go/flash_exchange.
Using an XML editor, open an existing behavior's XML file, and rename the file appropriately for the behavior you
1
intend to create.
2
Enter a new value for the
The following XML code creates a category named myCategory in the Flash Behaviors panel under which the
behavior will be listed.
<behavior_definition dialogID="Trigger-dialog" category="myCategory"
authoringEdition="pro" name="behaviorName">
Enter a new value for the name attribute of the behavior_definition tag. This will be the name of the behavior as
3
it will appear in the Flash authoring environment.
4
(Optional) If your custom behavior requires a dialog box, enter parameters using the
tags.
<dialog>
To learn about the tags and parameters used to create your own custom dialog boxes, see Extending Flash.
In the
5
<actionscript>
If you are new to ActionScript, see Learning ActionScript 2.0 in Adobe Flash or Programming ActionScript 3.0.
attribute of the
category
tag, insert the ActionScript code to create the behavior.
tag in the XML file.
behavior_devinition
FLASH CS3
User Guide
and
<properties>
227

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents