Tengo un código en una clase (solo pongo la parte que interesa) y un Imput Text llamado "campo" en la película (he probado tambien con Dynamic Text.
Cargo el swf desde otro en un contenedor y no me sale el texto. Alguien sabe si hay algo en el codigo mal? Muchas gracias de antemano.
[as] var cargador:URLLoader;
var campo:TextField;
var texto:String = "<h1>Esto es una cabecera h1</h1></br>" +
"<h2>Esto es una cabecera h2</h2></br>" +
"<p>Este es el contenido donde vamos a meter varios enlaces:</p>" +
"<p><a href='http://www.google.com'>Google</a></p>" +
"<p><a href='http://www.yahoo.com'>Yahoo</a></p>" +
"<p><a href='http://www.altavista.com'>Altavista</a></p>"
public function EjemploCSS():void
{
cargador = new URLLoader();
cargador.addEventListener(Event.COMPLETE, onCSSFileLoaded);
cargador.load(new URLRequest("ejemplo.css"));
}
public function onCSSFileLoaded(event:Event):void
{
var sheet:StyleSheet = new StyleSheet();
sheet.parseCSS(cargador.data);
campo.styleSheet = sheet;
campo.htmlText = texto;
}[/as]
