Build menu from xml with RotationMENU CS (AS3)

Author: Digicrafts Last Update: 08/04/2008

Example will included in the download product zip , in the directory "exampl/xml menu".

1. Prepare custom xml and image.

Prepare your image and save in a directory. Below show the suggestion directory structure.

 

 

Prepare your xml.

Structure of the custom xml.

<items id = "items">

<item path = "cover/1.jpg" width = "128" height = "128" type = "bitmapfile">
<link></link>
</item>

.....

<item path = "cover/10.jpg" width = "128" height = "128" type = "bitmapfile">
<link></link>
</item>

</items>

 

Description of the each custom xml node.

Node

Atrribute

Description

Item name The name of the asset use to build the menu item.
  width Width of the bitmap. Ignore when type is "movieasset".
  height Height of the bitmap. Ignore when type is "movieasset".
  type

The type of the asset define in name which use to build the menu item.

"movieasset" - it is a class name for movieclip
"bitmap" - it is a class name for bitmap
"bitmapfile" - it is a filename of an external image

link - The link of each item when getURL function enabled


Follow the xml structure show above and create a xml file with any text editor.

 

2. Import a rotationMENU CS component.

Open the "Components Panel", menu "Windows > Components".

 

Drag the RotationMenu on the stage from the Components Panel.

 

 

Select the RotationMenu on the stage and name it with instance name "menu_mc".

 

 

3. Fill in the necessary parameter.

Open the Component Inspector, menu "Windows > Component Inspector".

 

 

Fill in the xml file name in the xml source field. Here i fill in custom.xml.

 

 

Select the "Autostart" check-box if you want the menu start automatically.

 

 

5. Test the movie.

Press Ctrl+Enter or menu "Control > Test Movie" to start testing the menu.