Comunidad de diseño web y desarrollo en internet online

Un swf me funciona perfectamente pero no siempre

Citar            
MensajeEscrito el 15 Mar 2007 05:35 pm
Hola, tengo una pelicula swf que me funciona corrctamente cuando la hago funcioanr sola pero si la incluo en otro no me funciona correctamente. ¿Por qué puede ser?

podeis verlo en: http://www.realcenterinmo.com/rasweb.html donde debería ir incrustado.Seleccionar prediccion. Debería desaparecer el recuadro que aparece centrado en cada imagen.

Si poneis http://www.realcenterinmo.com/prediccion.swf vereis que funciona correctamente.

El código de esta película de prediccion es:


image_mc._alpha = 0;
image1_mc._alpha = 0;
image2_mc._alpha = 0;


this.createTextField("porcentaje", 2, 40, 111.4, 198.9, 20.8);
this.createTextField("porcentaje1", 3, 310, 111.4, 198.9, 20.8);
this.createTextField("porcentaje2", 4, 580, 111.4, 198.9, 20.8);
porcentaje.border = true;
porcentaje1.border = true;
porcentaje2.border = true;

var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
target_mc.startTimer = getTimer();
};
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._width = 250;
target_mc._height = 250;
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://www.inm.es/www/wwb/puert/wde0b000.gif", image_mc);
image_mcl.loadClip("http://www.inm.es/www/wwb/puert/wde0b012.gif", image1_mc);
image_mcl.loadClip("http://www.inm.es/www/wwb/puert/wde0b0d1.gif", image2_mc);

var miFormato:TextFormat = new TextFormat();
miFormato.bold = true;
miFormato.font = "Arial";
miFormato.size = 12;
miFormato.color = 0xFF0000;
miFormato.align = "center";
porcentaje.setNewTextFormat(miFormato);
porcentaje1.setNewTextFormat(miFormato);
porcentaje2.setNewTextFormat(miFormato);

_root.onEnterFrame = function() {
image_mc._alpha += 5;
image1_mc._alpha += 5;
image2_mc._alpha += 5;

_root.image_mc.percent = ( _root.image_mc.getBytesLoaded()/_root.image_mc.getBytesTotal())*100;
_root.image1_mc.percent1 = ( _root.image1_mc.getBytesLoaded()/_root.image1_mc.getBytesTotal())*100;
_root.image2_mc.percent2 = ( _root.image2_mc.getBytesLoaded()/_root.image2_mc.getBytesTotal())*100;

if (!isNan(this.image_mc.percent)) {
_root.porcentaje.text = "Cargando: "+ Math.round(_root.image_mc.percent)+" %";
}

if (!isNan(this.image1_mc.percent1)) {
_root.porcentaje1.text = "Cargando: "+ Math.round(_root.image1_mc.percent1)+" %";
}

if (!isNan(this.image2_mc.percent2)) {
_root.porcentaje2.text = "Cargando: "+ Math.round(_root.image2_mc.percent2)+" %";
}


// imagen cargada
// cargamos la función para el fx y eliminamos el campo que muestra el porcentaje

if (_root.image_mc.percent == 100) {
_root.porcentaje.removeTextField();
if (image_mc._alpha >= 100) {
delete _root.onEnterFrame;
}
}

if (_root.image1_mc.percent1 == 100) {
_root.porcentaje1.removeTextField();
if (image1_mc._alpha >= 100) {
delete _root.onEnterFrame;
}
}

if (_root.image2_mc.percent2 == 100) {
_root.porcentaje2.removeTextField();
if (image2_mc._alpha >= 100) {
delete _root.onEnterFrame;
}
}


}
stop();

Por juangogu

25 de clabLevel



 

firefox
Citar            
MensajeEscrito el 15 Mar 2007 05:36 pm
Por cierto, que defectos le veis a la web?¿aun no esta acabada y faltan mcuhas cosas, como el contador que no funciona, lo de fotos que lo tengo que arreglar, directiva q lo cambiaré...

La base de la web es una plantila de ejemplo del illustrator. Yo unicamente le cree la inactividad.

Por juangogu

25 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.