Creating custom effects in Adobe Flash

You can save the classic tweens as XML files in Flash and then use the effects in Adobe Captivate. To select and apply an effect created in Flash, select the object, click in Window > Effects panel, and then click Browse.

You can create the effects with any default duration you want. For a 30 fps project, an effect with 60 frames has a default duration of 2 seconds.

To make the parameters of the effect available on the user interface for editing, edit the XML file to specify the required parameters. These parameters appear on the left side of the Effects panel.

To enable editing of parameters:

  1. Open the XML file and in the Keyframes element, identify the property that you want to make available for editing on the user interface.

    This property typically has a numerical value assigned to it. For the list of properties that the Keyframes element can contain and their description, see www.adobe.com/go/learn_cp_flashactionscript_en.

  2. Change the numerical value of the property in the Keyframes element to a string.

  3. Add a new element, effect_config to the XML file. In this element, add a config_item element for every property that you want to make available for editing on the user interface. For details on the elements and attributes that you can add in this element, see XML elements for effects configuration parameters.

  4. In the config_item element (child of effect_config), add the attribute property_value.

  5. Specify the string that you assigned to the property in step 2 as the value for this attribute.

  6. Add the other attributes, such as type and default_value. For more information, see XML elements for effects configuration parameters.

  7. Repeat steps 4, 5, and 6 to enable editing for as many properties as you want.

XML elements for effects configuration parameters

The hierarchy of the effect_config element is as follows:

<effect_config> 
    <config_item> 
        <effect_property type="number" property_value="BLUR_X" default_value="50"> 
    </config-item> 
    <config_item> 
        <effect_property type="list" property_value="QUALITY" default_value="1"> 
            <list_items> 
                <list_item> 
                </list_item> 
            </list_items> 
        </effect_property> 
    </config_item> 
    <config_item> 
        <effect_property type="color" > 
            <effect_sub_property> 
            </effect_sub_property> 
        </effect_property> 
    </config_item> 
</effect_config>

Element

Attribute

Value

Type

Description

effect_config

effect_type

motion_path

 

Use this attribute to display the handles for editing the x and y coordinates of the motion path.

config_item

display_name

 

String

Specify the name of the configuration item (property) displayed to users on the Effects panel.

effect_property

property_value

This attribute is mandatory.

 

String

Specify the value of the configuration item. This value must be the same as the one that corresponds to the appropriate property in the ‘Keyframes’ element.

For example, in the Glow.XML file (Gallery > Effects > Filters), the Keyframe element contains BLUR_X as the value for blurX. To make the value of ‘blur’ editable from the user interface, add BLUR_X as the property_value in the effect_config element.

 

default_value

 

Number

Specify the default value displayed on the user interface.

 

valid_range

Syntax: valid_range="{{0,255}}"

 

Number

Specify the range of values applicable for the configuration item. For example, valid_range="{{0,255}}" indicates that the lowest value is 0 and the highest is 255.

You can specify the attribute ‘modifiers’ to modify the value specified on the user interface.

 

type

This attribute is mandatory.

number

 

Use this type to indicate that the configuration item is a number. You can specify the following attributes with this type:

  • valid_range

  • increment

  • modifiers

  • decimal_places

   

list

 

Use this type to indicate that the configuration item is a drop-down list. You can specify the following attributes with this type:

  • name

  • value

   

color

 

Use this type to indicate that the configuration item is to be associated with a color palette. You can specify the following attributes with this type:

  • rgb

  • alpha

   

bool

 

Use this type to indicate that the configuration item is a Boolean. The configuration item is associated with a check box.

The default value can be true or false.

   

seperator

 

Use this type to separate the configuration items with a horizontal space on the user interface.

This type can be used only for the config_item element.

 

increment

 

Number

Specify the value by which the parameter must be incremented when you click the parameter value, hold-down the mouse button, and move the mouse.

 

modifiers

Syntax: modifiers= "{offset:0,multiplier:0.01}"

  • offset

  • multiplier

Number

Use this attribute to modify the value specified on the user interface. Use Offset to increase or decrease the value specified on the user interface. To decrease the user-specified value, use a negative number as the Offset.

Use multiplier to multiply the value specified on the user interface by a number.

This attribute can be used with the type ‘number’ only.

 

decimal_places

 

Number

Specify the number of decimal places to be allowed for the configuration item. For example, a value of 3 allows you to specify 0.001 and not 0.00001.

list_item

(child of effect_property and list_items)

name

 

String

Specify the name of the list item(s).

 

value

 

Number

Specify the value that must be posted back to the Keyframes section when users select a list item.

effect_sub_property

(child of effect_property)

rgb

   

Use this attribute to specify the default hexadecimal RGB number. For example, specify rgb=”ff0000” for red.

This attribute is valid for the type ‘color’ only.

 

alpha

 

Number

Use this attribute to specify the default transparency of the color.

This attribute is valid for the type ‘color’ only.

Best practices for creating effects in Flash

  • Ensure that the FPS of the Flash application you are creating for effects is 30.

  • Ensure the value of ‘property_value’ in the effect_config section of the effect file (XML file) is the same as that of the one in the Keyframe section.

  • Break a single effect into multiple effects if the number of parameters is more than five. You can then create a sequence of these effects to achieve the desired result.

  • Avoid exporting an effect created using frame by frame animations in Flash. You cannot achieve the desired results when such effects are used in Adobe Captivate.

    Instead, create effects using classic tweens and import these tweens into Adobe Captivate.

  • Group the effect parameters by keyframes. You can use the ‘seperator’ type to group related properties.

  • Check if the XML file of the effect exported from Flash is valid, before using it in Adobe Captivate. To do so, open the XML file in a browser or an XML editor.