Comunidad de diseño web y desarrollo en internet online

no se como generar el xml para un codigo

Citar            
MensajeEscrito el 11 Jun 2008 11:36 pm
hola a todos, es mi primer post y estoy ansioso por encontrar la respuesta a este problema que tengo, y como ustedes sos re grosos recurro a ustedes :

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.

Por lucas_imaginar

7 de clabLevel



 

msie7
Citar            
MensajeEscrito el 11 Jun 2008 11:59 pm
y donde conseguiste el codigo no estaba el xml?
tendría que leerlo detenidamente, jeje tal ves mañana, XD

Por gcm

Claber

557 de clabLevel

3 tutoriales

Genero:Masculino  

Diseñador Grafico y Web, Geek

firefox
Citar            
MensajeEscrito el 12 Jun 2008 12:09 am
nop, baje el .fla pero este archivo no estaba, gracias por responder.

Por lucas_imaginar

7 de clabLevel



 

msie7

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.