Esta es mi duda. Tengo un web formada por varios archivos swf. En el index.swf tengo un menú que carga otros swf en un clip llamado contendor_mc.
Estos otros swf son distintas galerías de imágenes que cargan un xml distinto cada una. El código es uno de ellos cualquiera es en el frame 1:
Código :
co=0; _global.sig = 15; _global.pag2 = 0; this._lockroot = true;
y en el frame 2:
Código :
stop(); function iniciar(){ System.useCodepage = true; miXML.unload(); miXML=new XML(); miXML.load("furia-de-titanes.xml?NoCache=" + random(9999)); miXML.onLoad=interprete; miXML.ignoreWhite=true; } function interprete(){ texto=new Array(); texto=miXML; generar(); } inicio=0; y=90; function generar(){ acomentarios=texto.firstChild.childNodes; _global.totalc = acomentarios.length; trace("totalc es" +totalc); final = totalc_visible; attachMovie("mcPunto0","punto",this.getNextHighestDepth()); this["punto"].imagen1 = texto.firstChild.childNodes[0].attributes.imgthumb; this["punto"].imagen2 = texto.firstChild.childNodes[1].attributes.imgthumb; this["punto"].imagen3 = texto.firstChild.childNodes[2].attributes.imgthumb; this["punto"].imagen4 = texto.firstChild.childNodes[3].attributes.imgthumb; this["punto"].imagen5 = texto.firstChild.childNodes[4].attributes.imgthumb; this["punto"].imagen6 = texto.firstChild.childNodes[5].attributes.imgthumb; this["punto"].imagen7 = texto.firstChild.childNodes[6].attributes.imgthumb; this["punto"].imagen8 = texto.firstChild.childNodes[7].attributes.imgthumb; this["punto"].imagen9 = texto.firstChild.childNodes[8].attributes.imgthumb; this["punto"].imagen10 = texto.firstChild.childNodes[9].attributes.imgthumb; this["punto"].imagen11 = texto.firstChild.childNodes[10].attributes.imgthumb; this["punto"].imagen12 = texto.firstChild.childNodes[11].attributes.imgthumb; this["punto"].imagen13 = texto.firstChild.childNodes[12].attributes.imgthumb; this["punto"].imagen14 = texto.firstChild.childNodes[13].attributes.imgthumb; this["punto"].imagen15 = texto.firstChild.childNodes[14].attributes.imgthumb; this["punto"].grande1 = texto.firstChild.childNodes[0].attributes.imagen; this["punto"].grande2 = texto.firstChild.childNodes[1].attributes.imagen; this["punto"].grande3 = texto.firstChild.childNodes[2].attributes.imagen; this["punto"].grande4 = texto.firstChild.childNodes[3].attributes.imagen; this["punto"].grande5 = texto.firstChild.childNodes[4].attributes.imagen; this["punto"].grande6 = texto.firstChild.childNodes[5].attributes.imagen; this["punto"].grande7 = texto.firstChild.childNodes[6].attributes.imagen; this["punto"].grande8 = texto.firstChild.childNodes[7].attributes.imagen; this["punto"].grande9 = texto.firstChild.childNodes[8].attributes.imagen; this["punto"].grande10 = texto.firstChild.childNodes[9].attributes.imagen; this["punto"].grande11 = texto.firstChild.childNodes[10].attributes.imagen; this["punto"].grande12 = texto.firstChild.childNodes[11].attributes.imagen; this["punto"].grande13 = texto.firstChild.childNodes[12].attributes.imagen; this["punto"].grande14 = texto.firstChild.childNodes[13].attributes.imagen; this["punto"].grande15 = texto.firstChild.childNodes[14].attributes.imagen; fotoprov = this["punto"].grande1; this["punto"].fotocontenedor.loadMovie(fotoprov); this["punto"].reg = i; this["punto"]._x =0; this["punto"]._y = y; if((this["punto"].imagen2)==undefined){ this["punto"].invis2.enabled = false; } if((this["punto"].imagen3)==undefined){ this["punto"].invis3.enabled = false; } if((this["punto"].imagen4)==undefined){ this["punto"].invis4.enabled = false; } if((this["punto"].imagen5)==undefined){ this["punto"].invis5.enabled = false; } if((this["punto"].imagen6)==undefined){ this["punto"].invis6.enabled = false; } if((this["punto"].imagen7)==undefined){ this["punto"].invis7.enabled = false; } if((this["punto"].imagen8)==undefined){ this["punto"].invis8.enabled = false; } if((this["punto"].imagen9)==undefined){ this["punto"].invis9.enabled = false; } if((this["punto"].imagen10)==undefined){ this["punto"].invis10.enabled = false; } if((this["punto"].imagen11)==undefined){ this["punto"].invis11.enabled = false; } if((this["punto"].imagen12)==undefined){ this["punto"].invis12.enabled = false; } if((this["punto"].imagen13)==undefined){ this["punto"].invis13.enabled = false; } if((this["punto"].imagen14)==undefined){ this["punto"].invis14.enabled = false; } if((this["punto"].imagen15)==undefined){ this["punto"].invis15.enabled = false; } scroll_izda._visible = false; if(sig >= totalc){ scroll_dcha._visible = false; }else{ scroll_dcha._visible = true; scroll_dcha._y = 523,30; } } iniciar(); stop();
Bueno, las galerías funcionan perfectamente, cargan las imágenes, los thumbs y las grandes, sin problemas, y cuando cambio de una galería a otra me carga el xml nuevo, con las fotos nuevas, todo bien.
Lo curioso es que tanto en firefox como en chrome, si por ejemplo estoy en una galería que tiene sólo 3 fotos, y voy a otra que tiene 15, carga los 15 thumbs perfectamente, se ven todos, pero al instante, el thumb 4, 5, 6 y 7 (por ejemplo) desaparecen. Es decir, algunos de los que irían detrás de la última foto en la galería anterior... (no sé si me estoy explicando).
En IE no ocurre.
¿A alguien se le ocurre por qué está ocurriendo esto?
Muchas gracias