el codigo de action script es de esta manera:
Código ASP:
Ver originalvar my_xml:XML = new XML();
my_xml.load("data/menus2.xml");
my_xml.ignoreWhite = true;
var menues:Array = new Array();
var _this = this;
var submenu
my_xml.onLoad = function(success) {
if (success) {
// trace(this)
menues = this.childNodes;
for (var i = 0; i<menues.length; i++) {
_this.attachMovie("menu_mc", "menumc_"+i, i);
_this["menumc_"+i].menutxt.text = menues[i].attributes.label;
_this["menumc_"+i]._y = 15;
if (i == 0) {
_this["menumc_"+i]._x = 50;
} else {
_this["menumc_"+i]._x = _this["menumc_"+(i-1)]._x+_this["menumc_"+(i-1)]._width;
}
_this["menumc_"+i].onRollOver = function() {
this.gotoAndPlay(2)
menu_rollover(this);
};
_this["menumc_"+i].onRollOut = function() {
menu_rollout(this);
};
}
} else {
trace("no xml loaded");
}
};
function menu_rollover(mc) {
for(var i = 0; i<submenu.length; i++)
{
removeMovieClip(_this["submenu_"+i])
}
mc.gotoAndStop(2);
var menu_num = mc._name;
menu_num = substring(menu_num, menu_num.lastIndexOf("_")+2, menu_num.length);
submenu = menues[menu_num].childNodes
for(var i=0; i<submenu.length; i++){
_this.attachMovie("submenu_mc", "submenu_"+i, i+menues.length);
_this["submenu_"+i].menutxt2.text = submenu[i].attributes.label;
_this["submenu_"+i]._y = _this["menumc_"+menu_num]._y+ _this["menumc_"+menu_num]._height+10;
if(i == 0)
{
_this["submenu_"+i]._x = 50
}else{
_this["submenu_"+i]._x =_this["submenu_"+(i-1)]._x+ _this["submenu_"+(i-1)]._width
}
_this["submenu_"+i].onRollOver = function()
{
this.gotoAndStop(2);
}
_this["submenu_"+i].onRollOut = function()
{
this.gotoAndStop(1);
}
}
}
function menu_rollout(mc) {
mc.gotoAndStop(1);
muchas gracias por la ayuda relwarc