Santiago 0 Denunciar post Postado Janeiro 24, 2006 Olá! Estou tentando formatar um campo de texto usando CSS. O campo de texto carrega o XML normalmente, mas quando eu apliquei o codigo que carrega o CSS não aparece mais nada! Gostaria de saber o que está errado com este código que eu fiz: //importa a classeimport TextField.StyleSheet;//instancia o objetovar objEstilo:StyleSheet = new StyleSheet();//configura o campo de texto_root.texto.html = true;_root.texto.multiline = true;//cria a função onLoadobjEstilo.onLoad = function():Void{ //instancia un novo obj XML var meuXML:XML = new XML; //carrega o arquivo XML meuXML.load("iniciando_xml.xml"); //ignorando os espaços em branco meuXML.ignoreWhite = true; //quando carregar o xml executar a função meuXML.onLoad = function() { //aplica o estilo _root.texto.StyleSheet = this; _root.texto.text = this.childNodes[0].childNodes[1].childNodes[0]; //trace(this.childNodes[0].childNodes[0].attributes.id); //trace(this.childNodes[0].childNodes[1].childNodes); }} O XML é este: <?xml version="1.0" encoding="iso-8859-1"?><Estudando> <XML id="Flash no Atributo id"/> <XML><texto>Flash dentro da TAG XML<texto></XML></Estudando> E o CSS é este: texto {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;text-transform: capitalize;font-weight: bold;color:#FF0000;}conteudo {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #666666;} Obrigado a todos! Compartilhar este post Link para o post Compartilhar em outros sites
Santiago 0 Denunciar post Postado Janeiro 25, 2006 Alguém poderia dar uma olhada neste código para mim? Compartilhar este post Link para o post Compartilhar em outros sites