E-merald web-engineering Flash components
E-merald web-engineering Contact Site map
 
Home Components Support Purchase
Components

Customization

You can set the following authoring parameters for each Dynamic Button or Dynamic Radio Button component instance (the generic name — «dynamic menu button») in the Component inspector:

animationEffect sets the type of animation effect applied to the dynamic menu button. This parameter can be one of five values: Circulation, Heartbeat, Pulsar, Rotation or Vibration; the default value is Circulation. For more information, see Dynamic Menu Buttons animation.

animationIconSet specifies the set of icons (for selected and unselected state) applied to the dynamic menu button. This parameter can be one of five values: set1, set2, set3, set4 or set5; the default value is set1. For more information, see Dynamic Menu Buttons animation.

customIcons is an object type optional parameter that contains two values to be set: falseIcon and trueIcon. This parameter adds custom icons to the dynamic menu button. The values are the linkage identifiers of movie clips or graphic symbols in the library. The default values are undefined.

Note: Setting the custom icons disables the action of animationIconSet, iconColor and iconColorSelected parameters. For more information, see Dynamic Menu Buttons animation.

label sets the value of the text on the dynamic menu button; the default values are DynamicButton (for a dynamic button) and DynRadioButton (for a dynamic radio button).

labelPlacement orients the label text on the dynamic menu button in relation to the icon. This parameter can be one of three values: left, right or bottom; the default value is bottom.

sound is an object type optional parameter that contains two values to be set: rollover_sound and release_sound. This parameter attaches the sound(s) specified in the Values dialog box to the dynamic menu button when rolled over (rollover_sound) or released (release_sound). The sound(s) must be in the library of the current SWF file and specified for export in the Linkage Properties dialog box. The default values are undefined.

URL is an object type optional parameter that contains three values to be set: url, window, delay. This parameter specifies a document from a specific URL to be load into a window when the dynamic menu button is clicked.

url. The URL from which to obtain the document. The default value is undefined.

window. (Optional) Specifies the window or HTML frame into which the document should load. You can enter the name of a specific window or select from the following reserved target names: _self (the current frame in the current window), _blank (a new window), _parent (the parent of the current frame), _top (the top-level frame in the current window). The default value is _blank.

delay. Sets the time delay, in milliseconds, between onClick event and the beginning of a specified URL loading. The default value is 500.

To test this function, make sure the file to be loaded is at the specified location.

You can set the following authoring parameters specific to the Dynamic Button component:

selected sets the initial value of the dynamic button to selected (true) or unselected (false), if the toggle parameter is true. A selected dynamic button differs from unselected by the icon view. The default value is false.

toggle turns the dynamic button into a toggle switch. If true, the state of the dynamic button changes (from selected to unselected and vice versa) when clicked. If false, the dynamic button behaves like a normal push button; the default value is false.

You can set the following authoring parameters specific to the Dynamic Radio Button component:

groupName is the group name of the dynamic radio button. The default value is menuGroup.

selected sets the initial value of the dynamic radio button to selected (true) or unselected (false). A selected dynamic radio button differs from unselected by the icon view. Only one dynamic radio button in a group can have a selected value of true. If more than one dynamic radio button in a group is set to true, the dynamic radio button that is instantiated last is selected. The default value is false.

For other parameters that customize the color and text of Dynamic Button or Dynamic Radio Button component, see in the table below.

You can write ActionScript to set additional options for Dynamic Button or Dynamic Radio Button instances using the methods, properties and events of the Dynamic Button and Dynamic Radio Button classes. For more information, see Documentation.

You can transform a dynamic menu button horizontally and vertically while authoring and at runtime. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At runtime, use the setSize() method.

The bounding box of a dynamic menu button is invisible and also designates the hit area for the component. If you increase the size of the component, you also increase the size of the hit area. The default value for a component's size is 100 x 70 pixels. If the component's bounding box is too small to fit the component label, the label is clipped to fit.

Transforming a component instance vertically results in proportional change of an icon scale. Transforming a component instance horizontally reduces or increases its width and does not resize an icon. Change the component's width to fit the component label if necessary. Modifying the component does not change the height of a label text. For this purpose, you should use the fontSize parameter while authoring or DynamicButton.fontSize property at runtime.

Transforming Dynamic Menu Buttons component

A Dynamic Button component (as well as a Dynamic Radio Button component) uses the following styles (that also are the authoring parameters):

Style Description
fontFamily The font name for text. The default value is "_sans".
ActionScript usage example:
myDynamicMenuButton.setStyle("fontFamily", "Courier New");
fontSize The point size for the font. The default value is 11.
ActionScript usage example:
myDynamicMenuButton.setStyle("fontSize", 12);
fontStyle The font style: either "normal" or "italic". The default value is "normal".
ActionScript usage example:
myDynamicMenuButton.setStyle("fontStyle", "italic");
fontNormalStyle A set of styles (Object) for the label when a dynamic menu button is unselected:
fontColor. The text color. The default value is 0x000000 (black).
fontWeight. The font weight: either "none" or "bold". The default value is "none".
textDecoration. The text decoration: either "none" or "underline". The default value is "none".
backgroundColor. The color of the text field background. The default value is undefined.
borderColor. The color of the text field border. The default value is undefined.
fontColorDisabled. The text color when the component is disabled. The default color is undefined.
For information on ActionScript usage, see DynamicButton.fontNormalStyle.
fontOverStyle A set of styles (Object) for the label when a dynamic menu button is rolled over:
fontColor. The text color. The default value is 0x000000 (black).
fontWeight. The font weight: either "none" or "bold". The default value is "none".
textDecoration. The text decoration: either "none" or "underline". The default value is "none".
text. The value of the text on the dynamic menu button. The default value is undefined.
backgroundColor. The color of the text field background. The default value is undefined.
borderColor. The color of the text field border. The default value is undefined.
For information on ActionScript usage, see DynamicButton.fontOverStyle.
fontSelectedStyle A set of styles (Object) for the label when a dynamic menu button is selected:
fontColor. The text color. The default value is 0x000000 (black).
fontWeight. The font weight: either "none" or "bold". The default value is "none".
textDecoration. The text decoration: either "none" or "underline". The default value is "none".
text. The value of the text on the dynamic menu button. The default value is undefined.
backgroundColor. The color of the text field background. The default value is undefined.
borderColor. The color of the text field border. The default value is undefined.
For information on ActionScript usage, see DynamicButton.fontSelectedStyle.
iconColor The color of the icon. The default value is 0xFF6600 (orange).
ActionScript usage example:
myDynamicMenuButton.setStyle("iconColor", 0x0066CC);
iconColorSelected The color of the icon when the dynamic button is selected. The default value is 0xFF6600 (orange).
ActionScript usage example:
myDynamicMenuButton.setStyle("iconColorSelected", 0x000099);

Dynamic Menu Buttons animation

The Dynamic Radio Button component and the Dynamic Button component use the same animation; therefore, all of the animation control parameters and properties that described here equally refer to both components.

You can control the animation of Dynamic Radio Button or Dynamic Button components through the following three parameters in the Property inspector or in the Component inspector:

animationEffect defines the type of prebuilt dynamic effect. This parameter is applied when using both prebuilt and custom icons;

animationIconSet defines one of five prebuilt icon sets. This parameter becomes inactive if the user specifies the custom icons through the customIcons parameter;

customIcons is an optional parameter that allows you to choose two custom icons (that designate selected and unselected states of a dynamic button or a dynamic radio button) in the library and apply them to the component instance. Setting this parameter disables the action of animationIconSet parameter.

Each of five dynamic effects belongs to one of two groups: centric and non-centric. Division into groups is defined by dynamics of movement during the animation. For each of these groups of effects there are five sets (pairs) of icons displayed in the table below.

animationEffect animationIconSet icon state
set1 set2 set3 set4 set5
Non-centric effects:
Circulation
Heartbeat
Vibration
Animation icons Animation icons Animation icons Animation icons Animation icons falseIcon
trueIcon
Centric effects:
Pulsar
Rotation
Animation icons Animation icons Animation icons Animation icons Animation icons falseIcon
trueIcon

Bear in mind the following tips when using some prebuilt sets of icons:

animationIconSet Samples Tips
set3 (non-centric group) Animation icons To make these icons look natural choose the shades of red when setting iconColor or iconColorSelected parameters.
set2 (centric group) Animation icons These icons look best on a dark background.

All prebuilt sets of icons are developed in such a way that can be applied to any dynamic effect in corresponding group (non-centric or centric). Nevertheless, certain sets of icons were originally designed for specific effects. These combinations therefore are preferred to use. They are displayed in the following table.

animationEffect Preferred animation icon sets (in decreasing order)
sets icons
Circulation set1 ⇒ set2
Heartbeat set3 ⇒ set1 ⇒ set2
Vibration set4 ⇒ set5 ⇒ set3
Pulsar set1
Rotation set3 ⇒ set4 ⇒ set2 ⇒ set5

Each of five dynamic effects has its own parameters for icon location and its individual zone of scaling. Therefore, keep in mind these features when creating your custom icons for the specified dynamic effect. The following table contents the maximum and recommended sizes for a custom icon depending on specified effect. This will help you in designing icons for the dynamic effect you want to use.

animationEffect Height, pixels Width, pixels
max recommended max recommended
Circulation 31 ≤31 36 ≤32
Heartbeat 34 ≤31 46 ≤36
Vibration 33 ≤31 46 ≤36
Pulsar 40 ≤31 70 ≤54
Rotation 33 ≤27 44 ≤34
Note:
1) The location of a symbol registration point when creating your custom icons must be: upper left corner for Non-centric effects and central for Centric effects.
2) Both of two custom icons (falseIcon and trueIcon) must be of the same size.

Bear in mind the following tips when using some prebuilt dynamic effects.

animationEffect Tips
Circulation Although using custom icons disables the action of the iconColor and iconColorSelected parameters, it does not apply to the prebuilt animation item (rings) for this effect. Thus, you can specify the color of this item by setting the iconColor and iconColorSelected parameters for a component instance.
Pulsar Because this effect belongs to the centric group of Dynamic Menu Buttons animation effects, it is better to use centric round-shaped icons when specifying the custom icons. Also note that you should not use the white background for this effect. Otherwise, the effect becomes invisible.
Rotation Because this effect belongs to the centric group of Dynamic Menu Buttons animation effects, it is better to use centric round-shaped icons when specifying the custom icons. Also, using custom icons with this effect you can tune the rotation speed by setting the animationIconSet parameter to set1, set2 or set3.
© E-MERALD. All rights reserved.
© Designed by Fox.net.ua.