CSS+XML - Shouldn't this work?


var xml:XML;
var xmlList:XMLList;
var myStyle:StyleSheet;
var myTextLoader:URLLoader = new URLLoader();

var cssLoader:URLLoader = new URLLoader();
cssLoader.load(new URLRequest("styles.css"));
cssLoader.addEventListener(Event.COMPLETE, onCSSLoad);

function onCSSLoad(event:Event):void
{    
    myTextLoader.load (new URLRequest("myTextFile.xml"));
	myTextLoader.addEventListener(Event.COMPLETE, loadText);
	
	myStyle = new StyleSheet();
    myStyle.parseCSS(event.target.data);
	textField_txt.styleSheet = myStyle;
}

function loadText(event:Event):void
{
	xml = XML(event.target.data);
	xmlList = xml.children();
	textField_txt.text = xmlList[0];
}