samedi 5 mai 2012

Carregar Css E Aplicar Num Campo De Texto as3

var loader:URLLoader = new URLLoader();
var sheet:StyleSheet = new StyleSheet();

loader
.load(new URLRequest("style.css"));
loader
.addEventListener(Event.COMPLETE, onCssLoaded);
function onCssLoaded(event:Event):void
{
   sheet
.parseCSS(loader.data);
   textBox
.styleSheet = sheet;
   textBox
.htmlText = "seu texto em formato html";
}

Aucun commentaire:

Enregistrer un commentaire