MACROMEDIA FLASH 8-USING FLASH Use Manual page 97

Using flash
Table of Contents

Advertisement

To create a custom behavior:
1.
Using an XML editor, create a new XML file, and name it appropriately for the behavior
you intend to create.
You may want to open an existing behavior's XML file and save it using a new
filename. This gives you a template with which to create your custom behavior.
2.
Enter a category name.
This creates a category in the Behaviors panel under which the behavior is listed.
<behavior_definition dialogID="Trigger-dialog" category="myCategory"
authoringEdition="pro" name="behaviorName" >
3.
Enter a name for the behavior.
This parameter defines the name that will be listed in the Behaviors panel.
<behavior_definition dialogID="Trigger-dialog" category="myCategory"
authoringEdition="pro" name="behaviorName" >
4.
If the behavior relies on features available in only the Professional edition of Flash 8, specify
for the
pro
authoringEdition
5.
(Optional) If your custom behavior require a dialog box, enter parameters using the
and
<properties>
To learn about the tags and parameters used to create your own custom dialog boxes, see
Appendix B, "XML to UI."
6.
In the
<actionscript>
to create.
If you are new to ActionScript, see Learning ActionScript 2.0 in Flash.
For example:
<actionscript>
<![CDATA[
// Trigger Data Source Behavior
// Macromedia 2003
$TARGET$.trigger();
]]>
</actionscript>
7.
Save the file.
8.
Test the behavior.
For information on behaviors available in Flash, see
behaviors" on page
parameter.
tags.
<dialog>
tag, insert the ActionScript code to create the behavior you want
94.
"Controlling instances with
Creating custom behaviors
97

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents