2 Levels Accordion Menu

MORE TOPS
323 views | 2 replies
Wraith
Hi,
I just purchased the "2 Levels Accordion Menu".
I am having issues with the XML code or the AS script.
I think it is probably the XML code more than anything else.
Although it also looks like the AS script may not be working properly either.
Any how I 'm all screwed up with this menu.
According to this excerpt from your Help File, I should be able to use teh given XML and AS code to make the menu click-able for firing actions.

Unfortunately everything becomes clickable and none of the subitems or items show up after the top item that has a URL attached..

////////////////////////////////////////////////////////////////////////
04. Firing actions on item click
----------------------------------------
- The handler function looks like this:

menu_mc.onItemClick= function(node:XMLNodem, level:Number){ ... }

where node is the coresponding xml node loaded from the xml file, and level is either 1 if the clicked item is a first level menu item, or 2 if it's a subitem

- To trigger a getURL action, open the xml and add for each xml item tag new attributes and modify the handler function:

<item label="Home" url="http://www.google.com" target="_blank" />
or for a subitem
<subitem label="Browse Categories" url="http://www.google.com" target="_blank" />
....
menu_mc.onItemClick= function(node:XMLNode, level:Number){
getURL(node.attributes.url, node.attributes.target);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////

I should be able to use the bottom code in my AS for my menu.
But what is happening is that it is only giving me the top 2 items and making them clickable to a undefined URL.

Below is my XML code.

<menu>
<item label="business owners" />
<item label="overview" url="http://www.thunderwerks.com/vdextest/busown.php" target="_blank" >
</item>
<item label="video options" />
<subitem label="on-location" url="http://www.thunderwerks.com/vdextest/busown_Onlocal.php" target="_blank" />
<subitem label="custom motion graphics" url="http://www.thunderwerks.com/vdextest/busown_custom.php" target="_blank" />
<subitem label="instant motion graphics" url="http://www.thunderwerks.com/vdextest/busown_instant.php" target="_blank" />
</item>
<item label="business/social environments" url="http://www.thunderwerks.com/vdextest/bussocenv.php" target="_blank" />
</item>
</menu>



This is a copy of the AS code from the Menu and you will see your code added to the bottom.


Stage.scaleMode = "noScale";
Stage.showMenu = false;
Stage.align = "TL";

// LOAD XML AND GENERATE MENU
var xob:XML = new XML();
xob.ignoreWhite = true;
xob.onLoad = function(s) {
if (!s) {
trace("Error loading xml file !";
return;
}
menu_mc.data = this.firstChild;
};
xob.load("menu_Biz_data.xml";

menu_mc.onItemClick= function(node:XMLNode, level:Number){
getURL(node.attributes.url, node.attributes.target);

}


You will notice I pasted in the given code from your help file from 2 Levels Accordion Menu.
Can you please help with this?
Thank you,
Wraith
Posted on Aug 29, 2008 | Reply | Reply with Quote | Send PM | Report
alex
Hi Wraith,
You can contact directly the developer through your account, Oxylus has also it's own support forum at http://forum.oxylusflash.com/, or here in our forum. I'm sure they would aswer ASAP.
Posted on Aug 29, 2008 | Reply | Reply with Quote | Send PM | Report
OXYLUS
Hello Wraith,
Send me the files in a zip so I can take a look. (adrian {at} oxylus {dot} ro)

Adrian
Posted on Aug 30, 2008 | Reply | Reply with Quote | Send PM | Report