nose como armar el archivo gallery.xml para que cargue correctamente las imagenes que estarian en el directorio PHOTOS, intente pero solo me cargo la primera y como todavia n me meti mucho con xml no entiendo que puede ser que este haciendo mal, el codigo no es mio, pero calculo que esta correcto, falta otra parte que sos la declaraciones de las transiciones y demas que no hace falta para saber como armar el archvo este que me esta faltando:
aca les dejo el codigo:
ASSetPropFlags(_global, "findTweenValue", 1, 0);
this.importXML = new XML();
this.importXML.ignoreWhite = true;
this.importXML.onLoad = function (success)
{
if (success)
{
var _loc3 = this.firstChild;
menuA = new Array();
for (var _loc2 = _loc3.firstChild; _loc2 != null; _loc2 = _loc2.nextSibling)
{
menuA[menuA.length] = [_loc2.attributes.name, _loc2.attributes.image];
} // end of for
buildMenu();
}
else
{
trace ("ERROR loading xml");
} // end else if
};
this.importXML.load("gallery.xml");
function buildMenu()
{
this.createEmptyMovieClip("photoMenu", this.getNextHighestDepth());
photoMenu._x = 32;
photoMenu._y = 210;
this.createEmptyMovieClip("photoMenuMask", this.getNextHighestDepth());
photoMenuMask.attachMovie("menuMask", "menuMask", this.getNextHighestDepth());
photoMenuMask._x = 32;
photoMenuMask._y = 150;
photoMenu.setMask(photoMenuMask);
menuLength = menuA.length;
if (menuLength < 7)
{
photoMenu._x = Math.round(450 - menuLength * 97 / 2);
}
else
{
recordNumber = 1;
records.text = recordNumber + " - " + (recordNumber + 5) + " OF " + menuLength + " PHOTOS";
menuBack._visible = true;
menuNext._visible = true;
menuX = photoMenu._x;
} // end else if
menuLength = menuA.length;
menuSpacer = 5;
startX = 0;
for (var _loc2 = 0; _loc2 < menuLength; ++_loc2)
{
photoMenu.attachMovie("element", "e" + _loc2, _loc2);
e = photoMenu["e" + _loc2];
e.name = menuA[_loc2][0];
e.image = menuA[_loc2][1];
e.thumbnail.loadMovie("photos/" + e.image + "_thumb.jpg");
e.thumbnail2.loadMovie("photos/" + e.image + "_thumb.jpg");
e._x = startX;
startX = startX + (e._width + menuSpacer);
e.menuBg._alpha = 10;
e.menuBgMirror._alpha = 5;
e.picHolderGrad._alpha = 100;
e.thumbnail._alpha = 70;
e.thumbnail2._alpha = 30;
e.menuText.txt.photoTitle.text = "" + e.name + "";
e.onRollOver = function ()
{
this.thumbnail.tween("_y", -25, 3.000000E-001, "easeOutExpo");
this.thumbnail.alphaTo(100, 3.000000E-001);
this.menuBgMirror.alphaTo(15, 3.000000E-001);
this.menuBgMirror.tween("_height", 100, 3.000000E-001, "easeOutExpo");
this.thumbnail2.tween("_y", 185, 3.000000E-001, "easeOutExpo");
this.thumbnail2.alphaTo(50, 3.000000E-001);
this.picHolderGrad.tween("_y", 185, 3.000000E-001, "easeOutExpo");
this.picHolderGrad.tween("_height", 100, 3.000000E-001, "easeOutExpo");
this.menuText.tween("_y", -45, 3.000000E-001, "easeOutExpo");
this.menuText.txt.colorTo(0, 3.000000E-001);
this.menuBg.alphaTo(70, 3.000000E-001);
this.menuBg.tween("_y", 80, 3.000000E-001, "easeOutExpo");
this.menuBg.tween("_height", 130, 3.000000E-001, "easeOutExpo");
this.mask01.tween("_height", 100, 3.000000E-001, "easeOutExpo");
this.mask02.tween("_height", 100, 3.000000E-001, "easeOutExpo");
};
e.onRollOut = function ()
{
this.thumbnail.tween("_y", 5, 6.000000E-001, "easeOutExpo");
this.thumbnail.alphaTo(70, 6.000000E-001);
this.menuBgMirror.alphaTo(5, 6.000000E-001);
this.menuBgMirror.tween("_height", 70, 6.000000E-001, "easeOutExpo");
this.thumbnail2.tween("_y", 155, 6.000000E-001, "easeOutExpo");
this.thumbnail2.alphaTo(30, 6.000000E-001);
this.picHolderGrad.tween("_y", 155, 6.000000E-001, "easeOutExpo");
this.picHolderGrad.tween("_height", 70, 6.000000E-001, "easeOutExpo");
this.menuText.tween("_y", -15, 6.000000E-001, "easeOutExpo");
this.menuText.txt.colorTo(16777215, 6.000000E-001);
this.menuBg.alphaTo(10, 6.000000E-001);
this.menuBg.tween("_y", 80, 6.000000E-001, "easeOutExpo");
this.menuBg.tween("_height", 100, 6.000000E-001, "easeOutExpo");
this.mask01.tween("_height", 70, 6.000000E-001, "easeOutExpo");
this.mask02.tween("_height", 70, 6.000000E-001, "easeOutExpo");
};
e.onPress = function ()
{
changePhoto(this.name, this.image);
};
if (_loc2 == menuLength - 1)
{
recordNumber = 1;
name = menuA[0][0];
image = menuA[0][1];
photoTitle.autoSize = "left";
changePhoto(name, image);
} // end if
} // end of for
} // End of the function
function changePhoto(name, image)
{
photoTitle.text = "";
currentPhoto = image;
photoName = name;
bounce("_alpha", 30, this["photo" + photoNum], 8, 0);
++photoNum;
this.createEmptyMovieClip("photo" + photoNum, getNextHighestDepth());
this["photo" + photoNum].attachMovie("photo", "photo", getNextHighestDepth());
oldPhoto = this["photo" + (photoNum - 2)];
oldPhoto.removeMovieClip();
} // End of the function
menuBack._visible = false;
menuNext._visible = false;
photoNum = 0;
bueno espero que tengan una respuesta para mi, muchisisimas gracias de ante mano.
