Este es el codigo que estoy utilizando para cargar mi xml:
Código :
var menuXml = new XML();
function loadXml(file:String) {
menuXml.ignoreWhite = true;
menuXml.onLoad = loadMapData;
menuXml.load(file);
function loadMapData() {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
var bn = this.firstChild.childNodes[i].attributes.buttonName;
var t = this.firstChild.childNodes[i].attributes.thumbs;
var b = _root.btn.bM1.attachMovie("button", bn, i);
//var b1 = _root.btn.b1.attachMovie("button2", bn, i);
b._x = xStart+((bWidth+2)*i);
b._y = yStart;
b.txt = bn;
loadMovie(t, b.foto);
b.onPress = function() {
target = this._x;
};
b.onRollOver = function() {
this.t2._y = 20;
this.t2._alpha = 0;
Tweener.addTween(this.t1,{_alpha:0, _y:-10, time:0.5});
Tweener.addTween(this.t2,{_alpha:80, _y:0, time:0.5, onStart:function () {
this._visible = true;
}});
Tweener.addTween(this.foto,{_alpha:100, time:1, onStart:function () {
this._visible = true;
}});
};
b.onRollOut = function() {
Tweener.addTween(this.t1,{_alpha:100, _y:0, time:0.5});
this.t2._visible = false;
this.foto._visible = false;
};
b.t2._visible = false;
b.foto._visible = false;
b.t2._alpha = 0;
b.foto._alpha = 0;
}
}
}Me gustaria que al cliquear un boton este aparesca y al cliquear otro este desaparesca, para que el boton me qude nuvamente centrado con mi stageListener que es este:
Código :
var stageListener:Object = new Object();
stageListener.onResize = function() {
btn._x = (Stage.width/2)-(btn._width/2);
};
Stage.addListener(stageListener); 
