Galeria de Produtos em flash xml

FredAsterr

Power Member
Boas tou a tentar fazer uma galeria de produtos em flash so que nao tou a conseguir...

Alguem me poderia ajudar??

Vou explicar o que eu quero:

Tenho um xml com a seguinte extrutura:

Código:
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produtos[/COLOR][COLOR=#0000ff]>[/COLOR]
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]madeiras[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]porta[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]porta.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]porta de madeira e vidro[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]vidros[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]janela[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]janela.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]janela de vidro[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]plasticos[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]sofa[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]sofa.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]sopa de cabedal[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]cimentos[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]mesa[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]mesa.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]mesa de madeira e vidro[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produtos[/COLOR][COLOR=#0000ff]>[/COLOR]

os dados sao eventados ;)

Agora no flash vou ter 4 botoes e o que eu queria é que ao clicar mostras os produtos corespondente a area do botao...

Por exemplo o botao madeiras mostraria so os produtos que em <area> tem madeiras....

E isto em forma de galeria cada produto com a sua miniatura...

Cumps
 
Boas tou a tentar fazer uma galeria de produtos em flash so que nao tou a conseguir...

Alguem me poderia ajudar??

Vou explicar o que eu quero:

Tenho um xml com a seguinte extrutura:

Código:
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produtos[/COLOR][COLOR=#0000ff]>[/COLOR]
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]madeiras[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]porta[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]porta.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]porta de madeira e vidro[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]vidros[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]janela[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]janela.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]janela de vidro[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]plasticos[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]sofa[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]sofa.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]sopa de cabedal[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
[URL="file:///C:/wamp/www/PhpMySqlXml/www/produtos.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR][B]cimentos[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]area[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR][B]mesa[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]nome[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR][B]mesa.jpg[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]foto[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR][B]mesa de madeira e vidro[/B][COLOR=#0000ff]</[/COLOR][COLOR=#990000]titulo[/COLOR][COLOR=#0000ff]>[/COLOR] 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produto[/COLOR][COLOR=#0000ff]>[/COLOR]
 
 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]produtos[/COLOR][COLOR=#0000ff]>[/COLOR]
os dados sao eventados ;)

Agora no flash vou ter 4 botoes e o que eu queria é que ao clicar mostras os produtos corespondente a area do botao...

Por exemplo o botao madeiras mostraria so os produtos que em <area> tem madeiras....

E isto em forma de galeria cada produto com a sua miniatura...

Cumps

Estás a fazer isso mal.
O flash não lé isto <madeiras>, lê isto: <produto area="madeiras">.
Faz uma função:
Código:
function mudar(area){

  for(var i=0; i<XML.length; i++){

    if(XML.childNodes[i]==area){

    «Faz o que queres»

    };

  };

};
Despois nos botões metes no onPress tipo: mudar(madeira).
Não tive cuidado com o codigo, tens de mudar de forma a se adequar ao xml ;)
 
Última edição pelo moderador:
procura por as3 xml e vais ver que é mais fácil do que parece. ou então faz download de uma aplicação já feita, galerias baseadas em xml é o que não falta por aí..
 
Back
Topo