Using XML
Entering menu button parameters through an external XML file:
a. Open any text editor (e.g. Notepad) in which you will create the XML file. You may also wish to use XML editing software for this.
b. Create the XML file to be in the same format as the following example:
<?xml version="1.0" encoding="UTF-8" ?>
<menu>
<item>
<name>Products</name>
<link>getURL("products.html","_blank")</link>
</item>
<item>
<name>Downloads</name>
<link>loadMovie("downloads.swf",_level3)</link>
</item>
<item>
<name>Support</name>
<link>getURL("support.html","_blank")</link>
</item>
<item>
<name>Contact Us</name>
<link>getURL("mailto:info@yourdomain.com","")</link>
</item>
</menu>
Explanation of XML file content:
<?xml version="1.0" encoding="UTF-8" ?>
<menu>
</menu>
c. Save the XML file, giving it a name with a ".xml" extension. For example: "menu1.xml". It is recommended to always use lowercase names in order to prevent any confusion with mismatched letter casing. The filename should not include any spaces or special characters. If your XML file contains special characters (including accented characters), you should save the file in the Unicode or UTF-8 format.
d. Enter the name of the XML file in the "XML Filename" parameter in the textMenu properties panel.
e. Save your fla to the same folder as the XML file before testing your movie.
Note: An XML example file is included with your download. The name of this file is "menu.xml".
Flash relates to the root folder as being the folder where the HTML file resides. Therefore, if the SWF and HTML page are uploaded to differnt locations, the XML file should be placed in a folder relative the the path of the HTML file. For example, if you specify the XML filename with any path, the XML file should be uploaded to the same folder as the HTML file.
Adapting the above XML for use with the submenuMaker:
<?xml version="1.0" encoding="UTF-8" ?>
<menu>
<item>
<name>Products</name>
<link>getURL("products.html","_blank")</link>
<submenu>
<item>
<name>Product 1 </name>
<link>getURL("prod1.html","_blank")</link>
</item>
<item>
<name>Product 2</name>
<link>getURL("prod2.html","_blank")</link>
</item>
<item>
<name>Product 3</name>
<link>getURL("prod3.html","_blank")</link>
</item>
</submenu>
</item>
<item>
<name>Downloads</name>
<submenu>
<item>
<name>Download 1 </name>
<link>getURL("download1.html","_blank")</link>
</item>
<item>
<name>Download 2</name>
<link>getURL("download2.html","_blank")</link>
</item>
<item>
<name>Download 3</name>
<link>getURL("download3.html","_blank")</link>
</item>
</submenu>
</item>
<item>
<name>Support</name>
<link>getURL("support.html","_blank")</link>
</item>
<item>
<name>Contact Us</name>
<link>getURL("mailto:info@yourdomain.com","")</link>
</item>
</menu>
The XML code is similar to the XML code without the use of the submenuMaker, with the addition of the <submenu> tags. Place the <submenu> tag underneath each main menu button for which you would like a submenu. The submenus include <item>, <name> and <link> tags which are used in the same manner as the main menu tags.
An example of this XML is included with your download in a file called "submenus.xml".