...pq no cargas toda la galeria de un golpe en el xml???


----- Original Message ----- From: "annamarco" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, July 22, 2005 4:29 PM
Subject: [ASNativos] Problemas con xml


Hola Foro tengo un problema con una galería de fotos que pueden ver en
http://www.casalia.com.mx

Aparentemente todo va bien, pero cuando le pido que cargue otro autor, al
sustituir el xml via click en el boton del autor

on (release) {
   _parent.posy = this._y;
   if (_root.p != 0) {
       _root.p = 0;
       _root.xmlData.Load(media);
       _root.limpiaXML();
   }
}

La cadena que pasa se incorrecta, en veces pasa sólo nones en veces pares y
no logro encontrar que pasa

Ayuda, gracias



-------------------------------------------
delay = 4000;
// -----------------------
function loadXML(loaded) {
   if (loaded) {
       xmlNode = this.firstChild;
       image = [];
       description = [];
       total = xmlNode.childNodes.length;
       for (i=0; i<total; i++) {
           image[i] =
xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
           description[i] =
xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
       }
       firstImage();
   } else {
       content = "file not loaded!";
   }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml/images.xml");
p = 0;
this.onEnterFrame = function() {
   filesize = picture.getBytesTotal();
   loaded = picture.getBytesLoaded();
   preloader._visible = true;
   if (loaded != filesize) {
       preloader.preload_bar._xscale = 100*loaded/filesize;
   } else {
       preloader._visible = false;
       if (picture._alpha<100) {
           picture._alpha += 10;
       }
   }
};
function limpiaXML() {
   /*delete description;
   delete image;
   delete xmlNode;
   delete xmlData;*/
   delete loadXML;
}
function nextImage() {
   if (p<(total-1)) {
       p++;
       if (loaded == filesize) {
           picture._alpha = 0;
           picture.loadMovie(image[p], 1);
           desc_txt.htmlText = description[p];
           picture_num();
           slideshow();
       }
   }
}
function prevImage() {
   if (p>0) {
       p--;
       picture._alpha = 0;
       picture.loadMovie(image[p], 1);
       desc_txt.htmlText = description[p];
       picture_num();
   }
}
function firstImage() {
   if (loaded == filesize) {
       picture._alpha = 0;
       picture.loadMovie(image[0], 1);
       desc_txt.htmlText = description[p];
       picture_num();
       slideshow();
   }
}
function picture_num() {
   current_pos = p+1;
   pos_txt.text = current_pos+" de "+total+" diapositivas";
}
function slideshow() {
   myInterval = setInterval(pause_slideshow, delay);
   function pause_slideshow() {
       clearInterval(myInterval);
       if (p == (total-1)) {
           p = 0;
           firstImage();
       } else {
           nextImage();
       }
   }
}
//---------menu artistas-------------
function cargaXML1() {
   var primerNivel1 = this.firstChild;
   var menus = primerNivel1.childNodes;
   var posicionY = 160;
   menus.reverse();
   total1 = menus.length;
   for (v in menus) {
       menu = menus[v].firstChild;
       _root.attachMovie("menubot", "menubot1"+v, v+10);
       _root["menubot1"+v].menutext = menu.nodeValue;
       _root["menubot1"+v].direccion = menus[v].attributes.url;
       _root["menubot1"+v].media = menus[v].attributes.media;
       _root["menubot1"+v].goto1 = menus[v].attributes.goto;
       _root["menubot1"+v]._y = posicionY;
       _root["menubot1"+v]._x = 570;
       posicionY = posicionY+_root["menubot1"+v]._height-10;
       posy = -30;
       posx = 558;
   }
   limpiaXML1();
}
function limpiaXML1() {
   delete primerNivel1;
   delete menus;
   delete menu;
   delete docXML1;
}
var url, total1;
var docXML1 = new XML();
docXML1.ignoreWhite = true;
docXML1.onLoad = cargaXML1;
docXML1.load("xml/menu.xml");
// --------------lo que debe hacer cada boton del menu
function menuact(direccion, goto1) {
   url = direccion;
   goto = goto1;
   if (url == "") {
       _root.gotoAndPlay(goto);
   } else {
       getURL(url, "mainFrame", "GET");
   }
}
//-----borralosbotones
function borralos() {
   _root["menubot1"+v].removeMovieClip();
   //trace("v="+v);
}
//--------- mov figura flecha -----------
attachMovie("figura", "figura", 100);
figura.onEnterFrame = function(moverse) {
   figura._x = (posx+3*figura._x)/4;
   figura._y = (posy+3*figura._y)/4+1.5;
};
stop();
-------------------------------------------

----------------------------------
Lista ASNativos:[email protected]
http://www.5dms.com/listas
----------------------------------


----------------------------------
Lista ASNativos:[email protected]
http://www.5dms.com/listas
----------------------------------

Responder a