Código:
#include "mc_tween2.as"
Stage.scaleMode = "noScale";
//
var imagens:Array = new Array ("galerias/instalaciones/01.jpg", galerias/instalaciones/02.jpg");
var titulos:Array = new Array ("Imagem 01", "Imagem 02");
var nId:Number = -1;
var nIm:Number = 0;
//
desc_txt.html = true;
desc_txt.autoSize = "left";
total_txt.html = true;
total_txt.autoSize = "right";
//
function proxImg ():Void {
if (nId == imagens.length - 1) {
trace ("fim");
} else {
nId += 1;
nIm += 1;
_root.attachMovie ("img_mc", "img_mc" + nIm, nIm + 1);
eval (_root["img_mc" + nIm])._x = 20;
eval (_root["img_mc" + nIm])._y = 80;
_root.alphaTo (100, 0, "linear", 0, function () {
eval (_root["img_mc" + nIm]).mcl.loadClip (imagens[nId], eval (_root["img_mc" + nIm]).alvo_mc);
});
desc_txt.htmlText = (titulos[nId].toUpperCase ());
desc_txt._alpha = 0;
desc_txt.alphaTo (100, 1);
//
atual = addZero ((nId + 1), 2);
total = addZero (imagens.length, 2);
total_txt._alpha = 0;
total_txt.alphaTo (100, 1);
total_txt.htmlText = atual + "<font color='#999999'>" + "/" + total + "</font>";
}
}
//
function prevImg ():Void {
if (nId <= 0) {
trace ("fim");
} else {
nId -= 1;
nIm += 1;
_root.attachMovie ("img_mc", "img_mc" + nIm, nIm + 1);
eval (_root["img_mc" + nIm])._x = 20;
eval (_root["img_mc" + nIm])._y = 40;
_root.alphaTo (100, 0, "linear", 0, function () {
eval (_root["img_mc" + nIm]).mcl.loadClip (imagens[nId], eval (_root["img_mc" + nIm]).alvo_mc);
});
desc_txt.htmlText = (titulos[nId].toUpperCase ());
desc_txt._alpha = 0;
desc_txt.alphaTo (100, 1);
//
atual = addZero ((nId + 1), 2);
total = addZero (imagens.length, 2);
total_txt._alpha = 0;
total_txt.alphaTo (100, 1);
total_txt.htmlText = atual + "<font color='#999999'>" + "/" + total + "</font>";
}
}
//
function addZero (n, q):String {
var str = Math.pow (10, (q - n.toString ().length)).toString ().substr (1) + n;
return str;
}
//
proxImg ();
//
prox_bt.onRelease = proxImg;
prev_bt.onRelease = prevImg;
//
prev_bt.onRollOver = prox_bt.onRollOver = function () {
this.alphaTo (100, 1);
};
prev_bt.onRollOut = prox_bt.onRollOut = function () {
this.alphaTo (50, 1);
};

