i built a xml drop down menu from the kirupa tutorial that im trying to figure out how to space the next items below the submenus wondering if anyone can help ?
stop();
#include "mc_tween2.as"
menu_xml = new XML();
menu_xml.load("xmlmenunew.xml");
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(ok) {
for(o=0;o<menu_xml.childNodes.length;o++){
if(menu_xml.childNodes[o].attributes.name == "products"){
GenerateSitemap(sitemapwindow, "mainmenusitemap_mc3", 0, 0, 3, menu_xml.childNodes[o], "product");
}
}
};
var section1 = "product"
GenerateSitemap = function (container, name, x, y, depth, node_xml, section1, h_name, h_title, h_sub) {
var curr_node;
var curr_item;
var totall = node_xml.childNodes.length;
var curr_menu = container.createEmptyMovieClip(name, depth);
for (var i = 0; i<totall; i++) {
if (section1 != "portfolio") {
curr_item = curr_menu.attachMovie("sitemap_mcc", "item"+i+"_mc", i);
var stutter2 = curr_item._height*curr_node.childNodes.length;
curr_item._alpha = 0;
curr_item.trackAsMenu = true;
curr_item.msk._xscale = 1;
curr_node = node_xml.childNodes*;
_global.curr_item = this;
curr_item.cap.m_caption2 = curr_node.attributes.name;
curr_item.cap.m_caption.text = curr_node.attributes.name;
curr_item.cap.setMask(curr_item.msk);
curr_item.tween("_alpha", 100, 1, "easeOutExpo", i/totall*.7);
curr_item.msk.tween("_xscale", 100, 2, "easeOutExpo", i/totall*.7);
curr_item.bk._alpha = 60;
if (section1 == "product") {
curr_item._x = x;
var stutter = i*curr_item._height;
curr_item._y = y+stutter;
if (node_xml.childNodes*.nodeName == "menu") {
_global.curr_item = curr_item;
bbk.onRollOver = function() {
this.useHandCursor = false;
Closemenus(section1);
};
curr_item.node_xml = curr_node;
curr_item.enabled = false;
var yl = curr_item._y+curr_item._height;
var xl = curr_item._x+12;
GenerateSitemap(curr_menu, "submenu_mc"+i, xl, yl, 1000+i, curr_node, section1, subsa);
//subsa++
} else if (node_xml.childNodes*.nodeName == "item") {
curr_item.arrow._visible = false;
curr_item.enabled = true;
}
} else {
}
}
}
};