Foros del Web » Creando para Internet » Flash y Actionscript »

Error en galeria

Estas en el tema de Error en galeria en el foro de Flash y Actionscript en Foros del Web. Hola gente, les comento tengo una galeria, que no me respeta el orden de las imagenes que pongo en el XML. Aqui les dejo el ...
  #1 (permalink)  
Antiguo 29/05/2008, 08:55
 
Fecha de Ingreso: abril-2003
Mensajes: 260
Antigüedad: 21 años
Puntos: 1
Error en galeria

Hola gente,
les comento tengo una galeria, que no me respeta el orden de las imagenes que pongo en el XML. Aqui les dejo el codigo:

Cita:
function init()
{
System.useCodepage = true;
main_xml = new XML();
main_xml.ignoreWhite = true;
mainInfo = [];
main_xml.onLoad = function ()
{
totalNum = this.childNodes.length - 1;
for (var _loc4 = 0; _loc4 < totalNum; ++_loc4)
{
mainInfo[_loc4] = new Object();
var _loc3 = this.childNodes[_loc4].childNodes;
for (var _loc7 in _loc3)
{
var _loc5 = _loc3[_loc7].childNodes.length;
mainInfo[_loc4][_loc3[_loc7].nodeName] = _loc3[_loc7].attributes.value;
} // end of for...in
} // end of for
var _loc6 = this.childNodes[totalNum].attributes;
for (var _loc8 in _loc6)
{
_root[_loc8] = Number(_loc6[_loc8]);
} // end of for...in
nextFrame ();
};
main_xml.load("novedades.xml");
} // End of the function
function loadThumb(mc, no)
{
mc.screen.loadMovie(mainInfo[no].thumbURL);
mc.txtSubName = mainInfo[no].subName;
} // End of the function
function loadImage(no)
{
mainImg.txtName = mainInfo[no].name;
mainImg.txtContent = "";
openNum = no;
str = mainInfo[no].content;
i = -1;
mainImg.screen.loadMovie(mainInfo[no].imageURL);
mainImg.onEnterFrame = function ()
{
if (++i < str.length)
{
this.txtContent = this.txtContent + str.charAt(i);
} // end if
if (i == str.length)
{
delete this.onEnterFrame;
} // end if
};
} // End of the function
function moveNext()
{
for (var _loc2 = 0; _loc2 < len; ++_loc2)
{
var _loc1 = thumbBlock["thumbImg" + _loc2];
if (_loc1.targetY == -spaceY)
{
_loc1._y = _loc1.targetY = spaceY * showNum;
_loc1.no = setNumber(_loc1.no, totalNum);
loadThumb(_loc1, _loc1.no);
continue;
} // end if
_loc1.targetY = _loc1.targetY - spaceY;
} // end of for
} // End of the function
function movePrev()
{
for (var _loc2 = 0; _loc2 < len; ++_loc2)
{
var _loc1 = thumbBlock["thumbImg" + _loc2];
if (_loc1.targetY == spaceY * showNum)
{
_loc1._y = _loc1.targetY = -spaceY;
_loc1.no = setNumber(_loc1.no, totalNum);
loadThumb(_loc1, _loc1.no);
continue;
} // end if
_loc1.targetY = _loc1.targetY + spaceY;
} // end of for
} // End of the function
function setNumber(num, total)
{
if (isNext == true)
{
if (num == total - 1)
{
num = 0;
}
else
{
++num;
} // end else if
}
else if (num == 0)
{
num = total - 1;
}
else
{
--num;
} // end else if
return (num);
} // End of the function
this.stop();
init();
y la pueden ver en www.merchandisingweb.com.ar/test en la seccion novedades.

Gracias por su tiempo!
__________________
Bye!
  #2 (permalink)  
Antiguo 29/05/2008, 11:45
ramonjosegn
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Error en galeria

asegurate de estar poniendo los nombres de las imagenes de forma correcta
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:31.