XML Flash Menu - Problem with tutorial

Hey everyone!

MERRY CHRISTMAS!!!

OK, so I have my website, check the signature. I’ve wanted to create an XML based menu system that would replace what I’ve got. Or at least the HTML based one in the upper right corner.

So I’ve searched the net to find plenty of paid versions of other’s work, but nothing that works our well enough or with enough ease to modify in the future.

Then I fould the tutorial on www.kirupa.com.

Everything was going great. The tutorial made sense, everything was looking good… then I found a hard spot…

[COLOR=#003366][FONT=Verdana]**

[COLOR=#003366][FONT=Verdana]XML-Driven[/FONT][/COLOR][COLOR=#003366][FONT=Verdana] Drop-Down Menu[/FONT][/COLOR]
[COLOR=#003366][FONT=Verdana][COLOR=gray][FONT=Arial] by senocular [/FONT][/COLOR][/FONT][/COLOR]
[COLOR=#003366][FONT=Verdana][COLOR=gray][FONT=Arial][/FONT][/COLOR][/FONT][/COLOR]
[COLOR=#003366][FONT=Verdana][COLOR=gray][FONT=Arial][COLOR=black][FONT=Arial][FONT=Arial]Generating a Menu[/FONT][/FONT][/COLOR][COLOR=black][FONT=Arial]
[FONT=Arial]The GenerateMenu function follows these steps:[/FONT][/FONT][/COLOR]
[/FONT][/COLOR][/FONT][/COLOR]
**[/FONT][/COLOR][COLOR=#003366][FONT=Verdana][COLOR=gray][FONT=Arial]
[COLOR=black][FONT=Arial][FONT=Arial][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]The above is where I got stuck. Not being very XML knowledgable, this sections is difficult to understand.[/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]I guess what I need is a more broekn down version of this section. Or at least a break down of each section explaining what each variable is where it is needed.[/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]Here is my XML code that I will be using:[/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial]

[SIZE=2][COLOR=#0000ff]
<?[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]xml[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]version[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]1.0[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]?>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Menu[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Home[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Foum[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/forum[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Chatroom[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?pid=15[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Downloads[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?ind=downloads[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Links[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/forum/index.php?action=links[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Media[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Music[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/player/music[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Video[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/player/video[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Audio Bible (KJV)[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/bible/audio[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Resources[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Christian[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Bible Tools[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?pid=2[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Bible Translations[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]-=Under Construction=-[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?pid=2[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Online Tools[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Converters[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]-=Under Construction=-[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?pid=1[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Xara3D Banner Maker[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?pid=20[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]ClusterMap[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www3.clustrmaps.com/counter/maps.php?url=http://www.tsgcomputers.net[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Account/Contact[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Register[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/forum/index.php?action=register[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Invite[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/forum/index.php?action=invite[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]News[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?ind=news[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]item[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]Comment?[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]action[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]gotoURL[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]variables[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]http://www.tsgcomputers.net/index.php?pid=17[/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]menu[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE]

Section 1:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]Set up some variables to be used in the function call.

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]var curr_node; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]var curr_item; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]var curr_menu … [/FONT][/COLOR]

Section 2:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]Create an empty movieclip for the menu to live in within the passed container argument with the name given by the name argument at the depth given by the depth argument. Assign this clip to one of the variables created for future reference.

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]var curr_menu = container.createEmptyMovieClip(name, depth); [/FONT][/COLOR]

Section 3:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]For each node in the passed node_xml, create a menu item movieclip by attaching an instance of menuitem from the library.

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]for (var i=0; i<node_xml.childNodes.length; i++) { [/FONT][/COLOR]

Section 4:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]Position each menu item correctly so each following item is placed below the previous and set each to trackAsMenu (this allows for dragOver events to work as well as rollOver events).

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]curr_item._x = x; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item._y = y + i*curr_item._height; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.trackAsMenu = true; [/FONT][/COLOR]

Section 5:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]Save the attributes of each XML node (name, action and variables) to the item created for that node so that they may be referenced when needed, the name value being placed in the textfield in the attached menu item clip.

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]curr_node = node_xml.childNodes*; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.action = curr_node.attributes.action; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.variables = curr_node.attributes.variables; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.name.text = curr_node.attributes.name; [/FONT][/COLOR]

Section 6:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]Assign rollOver actions to each node, opening a submenu if a menu node and closing a submenu if an item node. When opening a menu, re-use GenerateMenu and position the new menu to the left of the current menu. The node for this menu is the current node which, when GenerateMenu is called for it, will make the new submenu based on all the nodes within this one. In closing a menu, any submenu_mc in the current menu is simply removed.

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]if (node_xml.childNodes*.nodeName == “menu”){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.node_xml = curr_node; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.onRollOver = curr_item.onDragOver = function(){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]var x = this._x + this._width - 5; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]var y = this._y + 5; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]GenerateMenu(curr_menu, “submenu_mc”, x, y, 1000, this.node_xml); [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}else{ // node is an item node [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.arrow._visible = false; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_item.onRollOver = curr_item.onDragOver = function(){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]curr_menu.submenu_mc.removeMovieClip(); [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]} [/FONT][/COLOR]

Section 7:
[COLOR=#003366][FONT=‘Courier New’] i. [/FONT][/COLOR][FONT=Arial][COLOR=black][FONT=Arial]Finally, assign a release action for each item (menu and otherwise) which calls the required action and closes all submenus.

[/FONT][/COLOR][COLOR=#003366][FONT=‘Courier New’][/FONT][/COLOR][/FONT]
[COLOR=#003366][FONT=‘Courier New’]curr_item.onRelease = function(){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actionsthis.action; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]CloseSubmenus(); [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}; [/FONT][/COLOR]

Section 8:
[COLOR=black][FONT=Arial][FONT=Arial]Notice how the actions are executed. You have some sort of Actions object with a reference to the action of the node with the variables passed in to it (as its being called as a function).[/FONT][/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actionsthis.action; [/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]The Actions object is, in fact, a custom object. This is the object to handle your actions, obviously. It contains functions with names that are similar to that which would be passed in to the action attribute of an XML node. The variables value is then passed in along with that. Consider the gotoURL action from previous examples. You would end up with a call such as. [/FONT][/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actions"gotoURL"; [/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]This calls the gotoURL function in the Actions object passing http://www.google.com along as an argument. You of course would need to make an Actions object and define what gotoURL is before being able to use it. Here’s an example that will open the passed url in a new window.[/FONT][/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actions = Object(); [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actions.gotoURL = function(urlVar){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]getURL(urlVar, “_blank”); [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}; [/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]For any action you wish to be able to use, you would create a function in the Actions object in this manner. Whatever functions you have there can then be used in the XML definition to specify what is to happen when a menu item is pressed.[/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Arial][FONT=Arial]In the final menu example, a textfield is placed at the bottom of the screen. An action in the Actions object is then used to change that text. The function for that is as follows where message_txt is the name of that textfield.[/FONT][/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actions.message = function(msg){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]message_txt.text = msg; [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}; [/FONT][/COLOR]

Section 9:
[COLOR=black][FONT=Arial][FONT=Arial]There’s one more action that I want to include, and thats an action that will load a new menu XML file into the XML object used to handle the menu.[/FONT][/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]Actions.newMenu = function(menuxml){ [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]menu_xml.load(menuxml); [/FONT][/COLOR]
[COLOR=#003366][FONT=‘Courier New’]}; [/FONT][/COLOR]

OK that is a lot of stuff to take in. All I am asking is an explaination of each section step by step.

God bless and thank you, again MERRY CHRISTMAS!!!,
Johnathan[/FONT][/COLOR]
[/FONT][/COLOR][/FONT][/COLOR]