Cita:
Iniciado por pituu2 pon el codigo o explicate un poco más asi veo si puedo ayudarte, no soy muy bueno, pero me doy maña.
hola pituu2 bueno te paso los codigos que utilizo y aversi me puedes ayudar a adaptarlo este es el xml:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image id="pic0.jpg" url = "index.htm"/>
<caption>Alergizina</caption>
</pic>
<pic>
<image id="pic1.jpg" url = "index.htm"/>
<caption>Alergizina</caption>
</pic>
<pic>
<image id="pic2.jpg" url = "index.htm"/>
<caption>Alergizina</caption>
</pic>
<pic>
<image id="pic3.jpg" url = "index.htm"/>
<caption>BB Nasal</caption>
</pic>
<pic>
<image id="pic4.jpg" url = "index.htm"/>
<caption>BB Nasal</caption>
</pic>
<pic>
<image id="pic5.jpg" url = "index.htm"/>
<caption>Cipropharma</caption>
</pic>
<pic>
<image id="pic6.jpg" url = "index.htm"/>
<caption>Cipropharma</caption>
</pic>
<pic>
<image id="pic7.jpg" url = "index.htm"/>
<caption>Cipropharma</caption>
</pic>
<pic>
<image id="pic8.jpg" url = "index.htm"/>
<caption>Doloir</caption>
</pic>
<pic>
<image id="pic9.jpg" url = "index.htm"/>
<caption>Doloir</caption>
</pic>
<pic>
<image id="pic10.jpg" url = "index.htm"/>
<caption>Doloir</caption>
</pic>
<pic>
<image id="pic11.jpg" url = "index.htm"/>
<caption>Dolomes</caption>
</pic>
<pic>
<image id="pic12.jpg" url = "index.htm"/>
<caption>Dolomes</caption>
</pic>
<pic>
<image id="pic13.jpg" url = "index.htm"/>
<caption>Dolokids</caption>
</pic>
<pic>
<image id="pic14.jpg" url = "index.htm"/>
<caption>Dolokids</caption>
</pic>
<pic>
<image id="pic15.jpg" url = "index.htm"/>
<caption>Gaseoflat</caption>
</pic>
<pic>
<image id="pic16.jpg" url = "index.htm"/>
<caption>Gaseoflat</caption>
</pic>
<pic>
<image id="pic17.jpg" url = "index.htm"/>
<caption>Klaritpharma</caption>
</pic>
<pic>
<image id="pic18.jpg" url = "index.htm"/>
<caption>Klaritpharma</caption>
</pic>
<pic>
<image id="pic19.jpg" url = "index.htm"/>
<caption>Klaritpharma</caption>
</pic>
<pic>
<image id="pic20.jpg" url = "index.htm"/>
<caption>Melixin</caption>
</pic>
<pic>
<image id="pic21.jpg" url = "index.htm"/>
<caption>Melixin</caption>
</pic>
<pic>
<image id="pic22.jpg" url = "index.htm"/>
<caption>Melixin</caption>
</pic>
<pic>
<image id="pic23.jpg" url = "index.htm"/>
<caption>Naproxpharma</caption>
</pic>
<pic>
<image id="pic24.jpg" url = "index.htm"/>
<caption>Naproxpharma</caption>
</pic>
<pic>
<image id="pic25.jpg" url = "index.htm"/>
<caption>Naproxpharma</caption>
</pic>
<pic>
<image id="pic26.jpg" url = "index.htm"/>
<caption>Oseolen</caption>
</pic>
<pic>
<image id="pic27.jpg" url = "index.htm"/>
<caption>Oseolen</caption>
</pic>
<pic>
<image id="pic28.jpg" url = "index.htm"/>
<caption>Oseolen</caption>
</pic>
<pic>
<image id="pic29.jpg" url = "index.htm"/>
<caption>Pharmapred</caption>
</pic>
<pic>
<image id="pic30.jpg" url = "index.htm"/>
<caption>Pharmapred</caption>
</pic>
<pic>
<image id="pic31.jpg" url = "index.htm"/>
<caption>Pharmapred</caption>
</pic>
<pic>
<image id="pic32.jpg" url = "index.htm"/>
<caption>Sulphytrim</caption>
</pic>
<pic>
<image id="pic33.jpg" url = "index.htm"/>
<caption>Sulphytrim</caption>
</pic>
<pic>
<image id="pic34.jpg" url = "index.htm"/>
<caption>Uropharma</caption>
</pic>
<pic>
<image id="pic35.jpg" url = "index.htm"/>
<caption>Uropharma</caption>
</pic>
<pic>
<image id="pic36.jpg" url = "index.htm"/>
<caption>Uropharma</caption>
</pic>
<pic>
<image id="pic37.jpg" url = "index.htm"/>
<caption>Zitrobac</caption>
</pic>
<pic>
<image id="pic38.jpg" url = "index.htm"/>
<caption>Zitrobac</caption>
</pic>
</images>
y este es el action ascript:
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].attributes.id;
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("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
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 nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
ok lo que nesisto como ves es linkear cada foto con su respwectivo html haora estan todos con index por queestoy probando una ves que comsiga el vinculo ya le cambio los html lo que no me funcion o no puedo hacer es la funcion en el action script que me haga el on realese y el geturl paraque me llama los html bueno esper oque me puedas ayudar gracias.