Hi!
I was trying to make my menu and come this far www.icep-design.com/hej but run into problems. So i started all over and made it load from XML but i haven’t yet figure out a way to make my submenu. If u take a look at www.icep-design.com/hej and rollover the laserdome button you can see what im going after. I still have no idea how to make it. anybody that can help me?
I post my AS here:
stop ();
import mx.transitions.Tween;
import mx.transitions.easing. *;
//Making submeny invisible
_root.over_mc._visible = false;
//xml test
menuXml = new XML;
menuXml.ignoreWhite = true;
menuXml.load (“menu_new.xml”)
menuXml.onLoad = function (success)
{
if (success)
{
menuItem = this.firstChild.childNodes;
for (var i = 0; i < menuItem.length; i ++)
{
item = root ["button_mc" + i];
item.upper_text.text = menuItem *.attributes.name;
item.lower_text.text = menuItem *.attributes.lower;
//text colors
item.upper_text.textColor = 0x969696;
item.lower_text.textColor = 0xBBBBBB;
//function for submenus
if (menuItem *.nodeName == “menu”)
{
// open a submenu
curr_item.node_xml = curr_node;
item.onRollOver = function ()
{
trace (“hej”)
}
}
//rollOver colors
item.onRollOver = function ()
{
//Colors of the text
this.upper_text.textColor = 0x000000;
this.lower_text.textColor = 0x000000;
}
//rollOut colors
item.onRollOut = function ()
{
this.upper_text.textColor = 0x969696;
this.lower_text.textColor = 0xBBBBBB;
}
//trace (this + " >> " + i + " : " + menuItem.length);
}
}
}
//rollOut remove movieclip on submenu
_root.over_mc.onRollOut = function ()
{
_root.over_mc._visible = false;
}
And here is my XML: