Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/08/2007, 13:26
vale
 
Fecha de Ingreso: mayo-2002
Mensajes: 148
Antigüedad: 21 años, 11 meses
Puntos: 0
Re: centrar imagen en movieclip

Probé así:
imagen1._x = Stage.width/2;
imagen1._y = Stage.height/2;
imagen2._x = Stage.width/2;
imagen2._y = Stage.height/2;

y coloca el angulo superior de la foto en ese punto...

Quizás con todo el código del slideshow alguien se anime...

Ahí va en AS:

info = new LoadVars();
info.load("imagenes.txt");

info.onLoad = function(leido) {
if(leido) {
fotos = new Array();
for( i=1; i<=info.total; i++ ) {
fotos[i] = this["foto"+i];
}

_root.createEmptyMovieClip("imagen1",10);
_root.createEmptyMovieClip("imagen2",11);

imagen1._x = Stage.width/2;
imagen1._y = Stage.height/2;
imagen2._x = Stage.width/2;
imagen2._y = Stage.height/2;


im = 1;
imagen1.loadMovie("images/" + fotos[im]);

im++;
imagen2.loadMovie("images/" + fotos[im]);
imagen2._alpha = 0;

disol = 10;
fijo = 35;
count_d = 0;
count_f = 0;

curr_mc = 1;

onEnterFrame = function () {
if( curr_mc == 1 ) {
count_f ++;
if( count_f >= fijo ) {
curr_mc = 2;
cambio = "IN";
}
}

if( curr_mc == 2 ) {
if( cambio == "IN" ){
imagen2._alpha += 100/disol;
if( imagen2._alpha >= 100 ) {
imagen2._alpha = 100;
cambio = "FIJO";
count_f = 0;
im++;
if( im == fotos.length )
im = 1;
}
imagen1.loadMovie("images/" + fotos[im]);
}
}

if( cambio == "FIJO" ) {
count_f++;
if( count_f >= fijo ) {
cambio = "OUT";
}
}

if( cambio == "OUT" ) {
imagen2._alpha -= 100/disol;
if( imagen2._alpha <= 0 ) {
imagen2._alpha = 0;
curr_mc = 1;
count_f = 0;
im++;
if( im == fotos.length ) {
im = 1;
}
imagen2.loadMovie("images/" + fotos[im]);
}
}
}
}
}
}

Ahi va imagenes.txt:

foto1=01.jpg&foto2=02.jpg&foto3=03.jpg&foto4=04.jp g&foto5=05.jpg&foto6=06.jpg&total=6