Siguiendo un tuto sobre galería de imágenes, me ha surgido un problema.
En el ActionScript del tutorial contempla el ejemplo con <10 imág. y según creo entender, llama las imág. con btunum+1, comenzando por btu0, btu1...
En mi caso al incorporar >10 imág., al pulsar en el thumbs correspondiente a btu10 no llama a la imágen 10, sino a la 1 pues se corresponde con btu1.
Mi pregunta es por tanto ¿Puedo modificar el código para poder añadir más imágenes?.
Aquí os dejo el código en cuestión.
Un saludo
Código ActionScript :
var startX = 50;
var startY = 52;
num = 14;
current = 0;
backimage._visible = 0;
stop();
upimage._alpha = 100;
_root.upimage.setMask(_root.mask);
mask.onEnterFrame = function() {
if (temp <= (400 + startX)) {
temp += 5;
this._x = temp;
running = 1;
upimage._alpha += 2;
} else {
backimage._visible = 1;
backimage.gotoAndStop(current);
}
};
var i = 0;
while (i < num) {
this[("btu" + i)].onRelease = function() {
btuNum = Number(this._name.slice(3, 4));
if (current != (btuNum + 1)) {
current = btuNum + 1;
temp = 0;
mask._x = temp;
mask.gotoAndPlay(2);
upimage._alpha = 0;
upimage.gotoAndStop(current);
}
};
i++;
} 