Código ActionScript :
var myMenu:XML = new XML();
myMenu.ignoreWhite = true;
System.useCodepage = true;
imgItem = new Array();
archivoItem = new Array();
myMenu.onLoad = function() {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
imgItem[i] = this.firstChild.childNodes[i].attributes.img;
archivoItem[i] = this.firstChild.childNodes[i].attributes.archivo;
}
creaBtns(this.firstChild.childNodes.length);
};
function creaBtns(cuantosBotones) {
var filas = 20;
var columnas = 6;
alturaY = 0;//posY en stage
alturaX = 0;//posX en stage
var xOffset = 167 //17 de separaciónX
var yOffset = 117 //17 de separaciónY
var depth = 0;
count = 0;
for (var f = 0; f<filas; f++) {
for (var c = 0; c<columnas; c++) {
target = this.attachMovie("item_mc", "item"+depth, depth++, {_x: c*xOffset, _y: 35+f*yOffset});
target.image_mc.loadMovie(imgItem[depth-1]);
target.archivo = archivoItem[depth-1];
target.onRelease = function() {
_parent._parent.clip_mc.y=-480;
_parent.ficha.noticias_xml.load(this.archivo);
};
target.onRollOver = function() {
this.alphaTo(80,1,_root.T);
};
target.onRollOut = function() {
this.alphaTo(100,1,_root.T);
};
if(++count>=cuantosBotones) return;
}
}
}
[b]_root.portfolio_mc.aspa_mc.onPress = function(){
target.unloadMovie("item" + i);
}[/b]
Lo que he puesto en negrita seria el cod del boton que deberia eliminar los mc's
Muchas gracias
Rocha
