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

Problema con Preload

Estas en el tema de Problema con Preload en el foro de Flash y Actionscript en Foros del Web. Hola Amigos: Tengo el siguiente código de un componente para hacer un preload en mi animacion de Flash: #initclip _global.PreloaderBar = function() { }; PreloaderBar.prototype ...
  #1 (permalink)  
Antiguo 22/12/2004, 09:23
 
Fecha de Ingreso: agosto-2004
Ubicación: Argentina
Mensajes: 81
Antigüedad: 19 años, 7 meses
Puntos: 0
Exclamación Problema con Preload

Hola Amigos:

Tengo el siguiente código de un componente para hacer un preload en mi animacion de Flash:

#initclip
_global.PreloaderBar = function() {
};
PreloaderBar.prototype = new MovieClip();
Object.registerClass("PreloaderBar", PreloaderBar);
PreloaderBar.prototype.onLoad = function() {
_root.stop("Escena 1");
};
PreloaderBar.prototype.onEnterFrame = function() {
if (this.s == "Upright") {
this.createEmptyMovieClip("back", 0);
with (this.back) {
beginFill(this.brc);
lineStyle(0, this.bxc);
moveTo(0, 0);
lineTo(this.w, 0);
lineTo(this.w, this.h);
lineTo(0, this.h);
lineTo(0, 0);
endFill();
}
this.createEmptyMovieClip("bar", 1);
with (this.bar) {
beginFill(this.bkc);
lineStyle(0, this.bxc);
moveTo(0, 0);
lineTo(this.w, 0);
lineTo(this.w, this.h);
lineTo(0, this.h);
lineTo(0, 0);
endFill();
}
} else {
this.createEmptyMovieClip("back", 0);
with (this.back) {
beginFill(this.bkc);
lineStyle(0, this.bxc);
moveTo(0, 0);
lineTo(this.w, 0);
lineTo(this.w, this.h);
lineTo(0, this.h);
lineTo(0, 0);
endFill();
}
this.createEmptyMovieClip("bar", 1);
with (this.bar) {
beginFill(this.brc);
lineStyle(0, this.bxc);
moveTo(0, 0);
lineTo(this.w, 0);
lineTo(this.w, this.h);
lineTo(0, this.h);
lineTo(0, 0);
endFill();
}
}
if (this.d == "Progressive" && this.s == "Horizontally") {
this.bar._xscale = (_root.getBytesLoaded()/_root.getBytesTotal())*100;
if (this.bar._xscale>=100) {
this.bar.removeMovieClip();
this.back.removeMovieClip();
eval(this.movie).gotoAndPlay(2);
}
}
if (this.d == "Regressive" && this.s == "Horizontally") {
this.bar._xscale = 100-(_root.getBytesLoaded()/_root.getBytesTotal())*100;
if (this.bar._xscale<=0) {
this.bar.removeMovieClip();
this.back.removeMovieClip();
_root.gotoAndPlay("Escena 1");
}
}
if (this.d == "Progressive" && this.s == "Upright") {
this.bar._yscale = 100-(_root.getBytesLoaded()/_root.getBytesTotal())*100;
if (this.bar._yscale<=0) {
this.bar.removeMovieClip();
this.back.removeMovieClip();
_root.gotoAndPlay("Escena 1");
}
}
if (this.d == "Regressive" && this.s == "Upright") {
this.bar._yscale = (_root.getBytesLoaded()/_root.getBytesTotal())*100;
if (this.bar._yscale>=100) {
this.bar.removeMovieClip();
this.back.removeMovieClip();
eval(this.movie).gotoAndPlay(2);
}
}
};
#endinitclip
stop();

El problema es que no logro que funcione. Estoy seguro que tengo que colocar ciertos parámetros en algun lugar del código. Paso a explicar como esta compuesta mi animación: Tiene 4 Escenas (Preload, Escena 1, Escena 2, Escena 3) estás tres ultimas escenas son la animación en sí, la verdad no sé si la escena que agregué llamada Preload sea necesaria.

Por favor, podrían decirme en que lugar tengo que poner los parámetro para que funcione mi preload de la animación.

Muchas Gracias, Felices Fiestas.

PD: mi mail es: [email protected]
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 05:41.