Bonjour à vous,
Je suis en train de créer un site en full flash, avec se qui nous intéresse ici des news à afficher.
D'un coté uniquement les titres et de l'autre donc la fenêtre qui fait un balayage avant d'afficher la news complète, le tout fournie par un seul fichier XML.
Est-ce qu'il y aurai un problême de cache ou de syntaxe peut-être?
Sachat que sans cette action de va et vient tout fonctionne nickel...
Merci de votre aide,
J'ai mis le
SWF ICI, pour mieux voir la situation.
Voici également le code qui gère tout ça:
/*************************/
var meuXML:XML = new XML();
meuXML.ignoreWhite = true;
meuXML.load('news.xml');
bt._visible = false;
meuXML.onLoad = function() {
var childs:XMLNode = meuXML.firstChild;
// Número total de nós
var childTotal:Number = childs.childNodes.length;
_global.fcn = function() {
for (var i = 0; i<childTotal; i++) {
if (i != selecionado) {
_parent.conteudo['bt'+i].enabled = true;
_parent.conteudo['bt'+i].useHandCursor = true;
_parent.conteudo['bt'+i].fd_txt.colorTo(0x99ccff, 1);
}
}
};
for (var i = 0; i<childTotal; i++) {
bt.duplicateMovieClip('bt'+i, _parent.conteudo.getNextHighestDepth());
/*************************/
_parent.conteudo.bt0.enabled = false;
_parent.conteudo.bt0.useHandCursor = false;
_parent.conteudo.bt0.fd_txt.colorTo(0x99ccff, 1);
/*************************/
var nData = (childs.childNodes[i].childNodes[0].firstChild.nodeValue);
var nTitulo = (childs.childNodes[i].childNodes[1].firstChild.nodeValue);
var nNoticia = (childs.childNodes[i].childNodes[2].firstChild.nodeValue);
var nImagem = (childs.childNodes[i].childNodes[3].firstChild.nodeValue);
/*************************/
_parent.conteudo['bt'+i].noticia_txt.autoSize = true;
_parent.conteudo['bt'+i].noticia_txt.html = true;
_parent.conteudo['bt'+i].noticia_txt.htmlText = nData+" - <font color='#000033'>"+nTitulo+"</font>";
/*************************/
_parent.conteudo['bt'+i].i = i;
var primeraData = childs.childNodes[0].childNodes[0].firstChild.nodeValue;
var primeroTitulo = childs.childNodes[0].childNodes[1].firstChild.nodeValue;
var primeraNoticia = childs.childNodes[0].childNodes[2].firstChild.nodeValue;
var primeraImagem = childs.childNodes[0].childNodes[3].firstChild.nodeValue;
_parent._parent.alvo.loadMovie(primeraImagem)
_parent._parent.texto_all.html = true;
_parent._parent.texto_all.htmlText = primeraData+" - <font color='#000033'>"+primeroTitulo+"<br /><br />"+primeraNoticia+"</font>";
/*************************/
_parent.conteudo['bt'+i].nData = nData
_parent.conteudo['bt'+i].nTitulo = nTitulo
_parent.conteudo['bt'+i].nNoticia = nNoticia
_parent.conteudo['bt'+i].nImagem = nImagem
/*************************/
_parent.conteudo['bt'+i].fd_txt._height = _parent.conteudo['bt'+i].noticia_txt._height+4;
_parent.conteudo['bt'+i]._y = _parent.conteudo['bt'+(i-1)]._y+_parent.conteudo['bt'+(i-1)]._height+2;
/*************************/
_parent.conteudo['bt'+i].onRollOver = function() {
this.fd_txt.colorTo(0x6699cc, 1);
};
_parent.conteudo['bt'+i].onRollOut = function() {
this.fd_txt.colorTo(0x99ccff, 2);
};
_parent.conteudo['bt'+i].onRelease = function() {
_parent._parent.gotoAndPlay("news");
_global.selecionado = this.i;
this.enabled = false;
this.useHandCursor = false;
fcn(); //
this._parent._parent._parent.alvo.loadMovie(this.nImagem)
this._parent._parent._parent.texto_all.htmlText = this.nData+" - <font color='#000033'>"+this.nTitulo+"<br /><br />"+this.nNoticia+"</font>";
};
}
};
---------------------------------------