Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Opa , então a parada é o seguinte...
Fiz um tutorial aqui de um album com xml mais é o seguinte ele não ta carregando as minhas imagens , mais não acheio o problema se alguem ae poder dar uma força fico agradecido...
Essa é a AS que eu to usando
PHP
[*]function loadXML(loaded) {
[*] if (loaded) {
[*] xmlNode = this.firstChild;
[*] image = [];
[*] total = xmlNode.childNodes.length;
[*] for (i=0; i<total; i++) {
[] image = xmlNode.childNodes.childNodes[0]**.firstChild.nodeValue; *
[] description = xmlNode.childNodes.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(); *
[]}; *
[]// /////////////////////////////////// *
[]p = 0; *
[]this.onEnterFrame = function()** { *
[] filesize = picture.getBytesTotal(); *
[] loaded = picture.getBytesLoaded(); *
[] preloader._visible = true; *
[] if (loaded != filesize) { *
[] preloader.preload_bar._xscale = 100loaded/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); *
[] picture_num(); *
[] } *
[] } *
[]} *
[]function prevImage() { *
[] if (p>0) { *
[] p--; *
[] picture._alpha = 0; *
[] picture.loadMovie(image[p], 1); *
[] picture_num(); *
[] } *
[]} *
[]function firstImage() { *
[] if (loaded == filesize) { *
[] picture._alpha = 0; *
[] picture.loadMovie(image[0], 1); *
[] picture_num(); *
[] } *
[]} *
[]function picture_num() { *
[] current_pos = p+1; *
[]} *
[]*
E esse é o XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.camvale.com.br/image_eventos/feissecre/img01.jpg</image>
</pic>
<pic>
<image>http://www.camvale.com.br/image_eventos/feissecre/img02.jpg</image>
</pic>
<pic>
<image>http://www.camvale.com.br/image_eventos/feissecre/img03.jpg</image>
</pic>
<pic>
<image>http://www.camvale.com.br/image_eventos/feissecre/img04.jpg</image>
</pic>
<pic>
<image>http://www.camvale.com.br/image_eventos/feissecre/img05.jpg</image>
</pic>
<pic>
<image>http://www.camvale.com.br/image_eventos/feissecre/img06.jpg</image>
</pic>
</images>
Desde ja valeu galera
Meu ajudemmmmmmmmm
Por Favorrrrrrrrrrrrrrrrrrrrrrrrr http://forum.imasters.com.br/public/style_emoticons/default/upset.gif http://forum.imasters.com.br/public/style_emoticons/default/hug.gif
uai.. aki ta normal..
ta carregando as imagens e aparecendo?
Ae pessoal eu to com o mesmo problema ...
So que no meu pc o album carrega normal as fotos ja no meu site .. não carrega ..
Eu não consegui achar onde esta o erro se alguem puder dar uma mão ...
Detalhe assim que conseguir resolver vou postar o album para a galera usar como tudo ..
So que meu album ele carrega um Thumb com as miniaturas das fotos que estão em uma pasta nomeada "peq" e as fotos grandes em outra pasta nomeada "grande"
Meu AS:
//xml e menu (duplica, attachmovie)System.useCodepage = true;meuXML = new XML();meuXML.ignoreWhite = true;meuXML.load("fotos.xml");function Duplica() { menuBot = "pequena"; _root.alvo_grande.loadMovie("grande/"+meuXML.childNodes[0].attributes.foto+".jpg"); _root.atual = 0; ini = 0; criamenu(ini); _root.bt_esq.onRelease = function() { ini<5 ? ini=0 : ini-=5 criamenu(ini) }; _root.bt_dir.onRelease = function() { ini<meuXML.childNodes.length-10 ? ini+=5 : ini=meuXML.childNodes.length-5 criamenu(ini) };}function criamenu(inicio) { posX = -83; posY = 0; for (var i = inicio; i<inicio+5; i++) { this.attachMovie(menuBot, "pequena"+i, i%5+10); var item:Object = this["pequena"+i]; item.num = i+1; var foto:String = meuXML.childNodes[i].attributes.foto; item.foto = (meuXML.childNodes[i].attributes.foto); item.desc = (meuXML.childNodes[i].attributes.desc); item.alvo_peq.loadMovie("peq/"+foto+".jpg"); _root.desc.desc2.desc_txt.text = meuXML.firstChild.attributes.desc; this._parent.existem.text = meuXML.childNodes.length; item._x = posX += (item._width)+3; item._y = posY; item.bt.useHandCursor = false; item.bt.onRollOver = function() { _root.atual = item.num; _root.desc_thumb.desc2.desc_txt.text = this._parent.desc; _root.desc_thumb.gotoAndPlay(2); var som:Sound = new Sound(); som.attachSound("som"); som.start(); }; item.bt.onRollOut = function() { _root.desc_thumb.gotoAndPlay(7); }; item.bt.onRelease = function() { _root.desc.desc2.desc_txt.text = this._parent.desc; _root.alvo_grande.loadMovie("grande/"+this._parent.foto+".jpg"); }; }}meuXML.onLoad = function(ok) { if (ok) { Duplica(this); }}; Meu XML:<?xml version="1.0" encoding="iso-8859-1"?><item foto="Foto1" end="[http://meusite.com.br/galeria/foto1.jpg"](http://meusite.com.br/galeria/foto1.jpg) desc="Foto 1 - Que Vista !"/>
Eu colequei no ar e acontece o seguinte , parece que ele ta carregando a imagem mais ela nao ta aparecendo o endereço que ta é esse aqui ó AQUI O LINK