My account
Shopping cart
Knowledge base
Support


Drop Down Menu V3 XML Description



Overview | Properties | Methods | Events | Styles | XML

view a Basic XML sample file (with minimum data to build a menu)
view a Advanced XML sample file (with styles, complex data and parameters)

V3 Component XML standard files you can hold and set the following data:

  • component properties
  • xml data used by the component
  • style data
the V3 Component XML basic file structure is the following:

<component>
      <properties>
           <propertyName>
                    <type>propertyDataType</type>
                    <value>propertyValue</value>
           </propertyName>
           ...
     </properties>
      <data>
            <main childStyle="style1">
                 <item title="Home" url="http://www.jumpeyecomponents.com" />
            ...
            </main>
      </data>
      <styles>
            <style1/>
            ...
      </styles>
</component>


Properties tag / Component properties

All properties that can be set from Component Inspector, can also be set with this V3 XML type of file.
You can also set properties for the component that are standard MovieClip (or other extended class) properties, such as _x, _width, _xscale, _alpha, etc for AS2 or x, width, scaleX, alpha, etc for AS3.

All properties has to be declared like in the following example:

<tweenType>
          <type>String</type>
          <value>Bounce</value>
</tweenType>


Data tag

In order to build the desired menu, the menu structure needs to be defined in the XML file, using the <data> tag.

The <data> tag will contain the <main> tag which contains the main menus as items (using the <item> tag); Those folder type menus that have childNodes will have their own <item> childNodes following this structure:

<data>
           <main>
                      <item>
                                 <item>
                                            <item />
                                            <item />
                                            <item />
                                 </item>
                                 <item />
                                 <item />
                      </item>
                      <item />
                      <item />
           </main>
</data>

The <main> tag may have the following attributes:

childStyle - the style that his childNodes will inherit in case they don't have their own style (optional) (you can also use the style attribute instead, even if it is interpreted only by its childNodes, since the main node has no visual reference, no applicable style)

The <item> tag may have the following attributes:

GENERAL ATTRIBUTES:
title - the text that will be shown in the menu item
icon - the icon of the menu item (optional)
style - the style of the item (optional)
childStyle - the style that his childNodes will inherit in case they don't have their own style (optional)
isEnabled - if the menu item is enabled(true) or disabled(false) (optional)
itemHeight - optional style parameter that can override the general style itemHeight parameter, this can be used to adjust the size of an item, in case it uses the same style

URL METHOD ATTRIBUTES
url - a url address to be followed when user clicks on the menu (optional)
target - the url target (optional)

FUNCTION ATTRIBUTES
function - the function with brackets and params, its path by dot notation like in eg.: myFunc(param1,param2) (optional)

USER ATTRIBUTES
any other attributes can be inserted here. You will have access to them from the item itself with dot notation


Style tag

All styles should be declared inside the XML that feeds the component under the node <styles>, in separate nodes using the name that will be used in the data node when using styles. E.g. <myStyleName> or <style1>

A style node may contain some nodes that will be used for configuring all states, while it also have a <states> node, containing all/or some of the states allowed for the skin.

The <style> node may contain the following child nodes

<folderIconId>

The value of the node should be the linkage id of the movieclip used for the icon of a parent node

<barIconSpacing>
This style is used only in horizontal orientation mode.
The distance between the beginning of the movieclip item and the place where the text begins, a distance that will be used only if an icon will be displayed in the place, only if the icon attribute of the item node is set.

<popIconSpacing>
This style is used only in pop menus (main vertical mode and on all submenus).
The distance between the beginning of the movieclip item and the place where the text begins, a distance that will be used to display an icon.

<fixedSize>
Boolean, if true the menu size (width) will be taken from the size of the movieclip; if false, the size will be taken from the text size (the longest text size)

<itemHeight>

The value of the node should be a number that will be used for sizing the height of an item

<itemSpacing>
The value will be used for spacing between icon and text inside a icon, and where spacing is needed

<textFormat>
The node has exactly the same structure of a TextFormat Class but in XML format, all its childNodes will be added to the menu item TextField as TextFormat properties.
E.g.
<textFormat>
          <font>Tahoma</font>
          <size>11</size>
          <color>0xFF0000</color>
          <bold>false</bold>
          <italic>false</italic>
          <underline>false</underline>
</textFormat>
<states>
The node may will contain a child node for each possible state, however, you can omit states, you can simply define only the mandatory <up> state and it will be used for all others in base of the state substitution order.
The possible states are the following:

<up>

<over>
<down>
<selected>
<disabled>
<expanded_up>
<expanded_over>
<expanded_down>
<expanded_selected>

Every state may contain the following child nodes:

<textFormat>
This OPTIONAL node has exactly the same structure of a TextFormat Class but in XML format, all its childNodes will be added to the menu item TextField as TextFormat properties. It overrides the general textFormat for a speciffic state.

<mcLinkageId>
The linkage id of the movieclip that will be loaded as a specific state of the menu item. This movieclip have to be found inside the flash library.
<parts>
The node may will contain a child node for each possible part (top, botton, lef, right, vertical and horizontal separators). All these nodes link to movieclips that will be loaded from the library.

Horizontal menu style (main menubar)
<left>
<right>
<hseparator>

Vertical menu style (main vertical menu and all submenus)
<top>
<bottom>
<vseparator>

Overview | Properties | Methods | Events | Styles | XML