designmix 0 Denunciar post Postado Julho 24, 2007 galera hoje tenho um swf que ler um xml so que não coloca link... ele escreve a tag html como se fosse txt normal ele responde assim flfdshkllggioidhteste da função de retira as TAGS <a href=''dasda'' target=''sasa'' > HTML</a> meu script esta assim : #include "mc_tween2.as"stop();System.useCodepage = true;//Declaramos o objeto XML dadosXML = new XML();dadosXML.ignoreWhite = true;//array de estadosvar estados_array = [];//Carrega o arquivo XMLfunction carregaMapa() { for (indice in mapa_mc) { //if (indice != "outline_mc") { estado = indice.substring(0, 2); mapa_mc[indice].estado = estado; //////habilita ou nao o estado if (mapa_mc[indice].habilita == 1) { mapa_mc[indice].colorTransformTo(100,0,100,0,100,0,100,1,1,"easeOutQuad"); mapa_mc[indice].onRelease = function() { carregaEstado(this.estado.toUpperCase()); }; mapa_mc[indice].onRollOver = function() { this.colorTransformTo(100,125,100,105,100,255,100,1,1,"easeOutQuad"); }; mapa_mc[indice].onRollOut = function() { this.colorTransformTo(100,0,100,0,100,0,100,1,1,"easeOutQuad"); }; } else { //desabilita mapa_mc[indice].colorTransformTo(100,0,100,0,100,0,100,1,1,"easeOutQuad"); } }}///function carregaRepresentantes(estado) { estadoClicado = estado; //dadosXML.load("http://matrix/safetiline/site/inc/distribuidores_feed.asp"); dadosXML.load("./inc/distribuidores_feed.asp"); //dadosXML.load("teste.xml"); scroller_mc.conteudo_mc.texto_txt.htmlText = "Carregando..."; scroller_mc.meuScroll.resetaBarra();}///////mapaPos = {scaleInicial:mapa_mc._xscale, posX:mapa_mc._x, posY:mapa_mc._y};////////////////Quando carregar completamente, executa a função dadosXML.onLoad = function(ok):Void { dadosXML.parseXML(this); //Carrega o Arquivo com a data do Servidor scroller_mc.conteudo.texto_txt.htmlText = ""; if (ok) { if (estado_atual == undefined) { scroller_mc.conteudo.texto_txt.htmlText = ""; } for (i=0; i<dadosXML.firstChild.childNodes.length; i++) { //so adiciona se tiver algo no estado if (dadosXML.firstChild.childNodes[i].firstChild != null) { estado_atual = dadosXML.firstChild.childNodes[i].attributes.estado; estados_array.push(estado_atual); if (estadoClicado.toLowerCase() == estado_atual.toLowerCase()) { mapa_mc[estado_atual.toLowerCase()+"_mc"].habilita = 0; scroller_mc.conteudo.texto_txt.htmlText = ""; for (j=0; j<dadosXML.firstChild.childNodes[i].childNodes.length; j++) { nome = dadosXML.firstChild.childNodes[i].childNodes[j].attributes.nome; descricao = dadosXML.firstChild.childNodes[i].childNodes[j]; tmpD = dadosXML.firstChild.childNodes[i].childNodes[j].toString(); scroller_mc.conteudo.texto_txt.htmlText += nome+"<BR>"+tmpD.split("|").join("<BR>")+"<BR><BR>"; } } else { mapa_mc[estado_atual.toLowerCase()+"_mc"].habilita = 1; } } } //trace(dadosXML); carregaMapa("a"); }};//////////////////function carregaEstado(estado) { estadoClicado = estado; for (i=0; i<dadosXML.firstChild.childNodes.length; i++) { //so adiciona se tiver algo no estado if (dadosXML.firstChild.childNodes[i].firstChild != null) { estado_atual = dadosXML.firstChild.childNodes[i].attributes.estado; estados_array.push(estado_atual); if (estadoClicado.toLowerCase() == estado_atual.toLowerCase()) { mapa_mc[estado_atual.toLowerCase()+"_mc"].habilita = 0; scroller_mc.conteudo.texto_txt.htmlText = ""; for (j=0; j<dadosXML.firstChild.childNodes[i].childNodes.length; j++) { nome = dadosXML.firstChild.childNodes[i].childNodes[j].attributes.nome; descricao = dadosXML.firstChild.childNodes[i].childNodes[j]; tmpD = dadosXML.firstChild.childNodes[i].childNodes[j].toString(); scroller_mc.conteudo.texto_txt.htmlText += nome+"<BR>"+tmpD.split("|").join("<BR>")+"<BR><BR>"; } } else { mapa_mc[estado_atual.toLowerCase()+"_mc"].habilita = 1; } } }}///carregaRepresentantes("a"); Compartilhar este post Link para o post Compartilhar em outros sites
Eder Fortunato 15 Denunciar post Postado Julho 24, 2007 acrecenta esse linha para habilitar o html nas caixas de texto scroller_mc.conteudo_mc.texto_txt.html = true Compartilhar este post Link para o post Compartilhar em outros sites