Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/01/2006, 04:07
aviana
 
Fecha de Ingreso: enero-2002
Ubicación: Graná
Mensajes: 646
Antigüedad: 22 años, 4 meses
Puntos: 0
Pracias por responder, pero me da 0. ¿Me puedes echar una mano? es la 1ª vez que hago esto. El código es:

// crear un clip vacio para cargar la imagen
this.createEmptyMovieClip("cargador", 1);
// crear un campo de texto para mostrar el porcentaje cargado de la imagen
this.createTextField("porcentaje", 2, donde_x, donde_y, 100, 0);

this.cargador.loadMovie(imagen);

// cargar la imagen
this.cargador.get
this.cargador._alpha = 0;
// precarga
this.onEnterFrame = function() {
this.cargador.percent = (this.cargador.getBytesLoaded()/this.cargador.getBytesTotal())*100;
if (!isNan(this.cargador.percent)) {
this.porcentaje.text = Math.round(this.cargador.percent)+" %";
}
// imagen cargada
if (this.cargador.percent == 100) {
alfa(this.cargador);
this.porcentaje.removeTextField();
delete this.onEnterFrame;
}
};

trace(this.cargador._width);

anchura_foto=this.cargador._width;
altura_foto=this.cargador._height;
anchura_contenedor=400;
altura_contenedor=380;
punto_x=(anchura_contenedor/2)-(anchura_foto);
punto_y=(altura_contenedor/2)-(altura_foto/2);

this.cargador._x = punto_x;
this.cargador._y = punto_y;

}