Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

tchela

Sistema de notícias flash + xml

Recommended Posts

Olá pessoal! Achei um sistema de notícias usando xml que funciona bacana, mas não entendo pq o texto em xml não aparece por completo. tenho pouca experiência em actionscript e não to conseguindo identificar se o erro está nesse script.

 

 

#include "lmc_tween.as"

 

_root.texto.setMask (mask_mc)

 

texto.scrolledMC.news.htmlText ="carregando .."

 

mc.title.text = "carregando .."

 

texto.scrolledMC.news.html = true

 

System.useCodepage = true;

 

var news_d:XML = new XML();

 

news_d.ignoreWhite = true;

 

news_d.onLoad = function(){

 

mc.title.text = ""

 

texto.scrolledMC.news.htmlText = "<b>"+this.childNodes[0].attributes.date+"</b><br>"+this.childNodes[0].attributes.texto+""

 

_global.yeah = this.childNodes.length;

 

for (a=0; a<yeah; a++) {

 

mc.duplicateMovieClip("mc"+a, a+1)

 

_root["mc"+a]._y += (mc._height+0.5)*a

 

_root["mc"+a].title.text = this.childNodes[a].attributes.title;

 

_root["mc"+a].mensage = this.childNodes[a].attributes.texto

 

_root["mc"+a].date = this.childNodes[a].attributes.date

//by diogopitz now:

 

todos = [];

 

for(t=0;t<yeah;t++){

 

todos[t] = _root["mc"+t];

}

 

_root["mc"+a].onRelease = function () {

 

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

 

if(todos == this){

 

this.colorTo(0x0099ff, 1);

}

else{

todos.colorTo(0x333333,1);

}

}

 

texto.scrolledMC.news.htmlText = "<b>"+this.date+"</b><br>"+this.mensage+""

};

};

};

 

// carregando o arquivo.xml

news_d.load('news.xml');

 

 

Espero que me ajudem. Valeu!

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.