Estoy haciendo un visor de imagenes, pero algo pasa y la primera foto y la ultima que carga, las esta cargando fuera del lugar (donde carga el resto).
Tengo un mc donde cargo las fotos que se llama photo y este tiene el siguente codigo:
Código :
onClipEvent (data) {
ancho = _root.photo._width;
alto = _root.photo._height;
if (ancho>434 || alto>434) {
_root.photo._width = 434;
_root.photo._height = 434;
}
mitaancho = ancho/2;
mitaalto = alto/2;
centrox = 300;
centroy = 250;
posx = centrox-mitaancho;
posy = centroy-mitaalto;
_root.photo._x = posx;
_root.photo._y = posy;
} Y en el primer fotograma tengo:
Código :
carpeta = "imagenes";
path = "/";
nombre = "img";
tipo = ".jpg";
num = 5;
x = 0;
p = x+1;
for (i=0; i<num; i++) {
array[i] = (i);
}
loadMovie(carpeta+path+nombre+array[0]+tipo, _root.photo); y los botones son.
Adelante:
Código :
on (release, keyPress "<Right>") {
if (x<num-1) {
x++;
loadMovie(carpeta+path+nombre+array[x]+tipo, _root.photo);
} else if (x=num-1) {
x = 0;
loadMovie(carpeta+path+nombre+array[x]+tipo, _root.photo);
}
p = x+1;
} Atraz:
Código :
on (release, keyPress "<Left>") {
if (x>0) {
x--;
loadMovie(carpeta+path+nombre+array[x]+tipo, _root.photo);
} else if (x=1) {
x = num-1;
loadMovie(carpeta+path+nombre+array[x]+tipo, _root.photo);
}
p = x+1;
} gracias
