Para resumir creo que me haria falta algo de codigo que reinicie el mc en rollOut por ejemplo pero no se como hacerlo.
El codigo del mc es:
Código :
//función FX fadeIn
alfa = function (clip) {
this.createEmptyMovieClip("loop", 3);
loop.onEnterFrame = function() {
clip._alpha += 10;
if (clip._alpha>=100) {
delete loop.onEnterFrame;
}
};
};
// 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, 129, 132, 200, 16);
this.cargador._x = 0;
this.cargador._y = 0;
this.ancho = 368;
this.alto = 282;
this.cargador._alpha = 0;
// dibujar marco
with (this) {
lineStyle(2, 0x000000, 100);
moveTo(this.cargador._x, this.cargador._y);
lineTo(this.cargador._x+this.ancho, this.cargador._y);
lineTo(this.cargador._x+this.ancho, this.cargador._y+this.alto);
lineTo(this.cargador._x, this.cargador._y+this.alto);
lineTo(this.cargador._x, this.cargador._y);
}
// precarga
this.onEnterFrame = function() {
this.cargador.percent = (this.cargador.getBytesLoaded()/this.cargador.getBytesTotal())*100;
if (!isNan(this.cargador.percent)) {
this.porcentaje.text = "Cargados"+ Math.round(this.cargador.percent)+" %";
}
// imagen cargada
if (this.cargador.percent == 100) {
alfa(this.cargador);
this.porcentaje.removeTextField();
delete this.onEnterFrame;
}
};
Y el codigo del boton es:
Código :
tv2.onRollOver = function (){
mc.cargador.loadMovie("tv/imagtv01.jpg");
}
GRACIAS.
