Actionscript Code:
subMenu = new XML();
subMenu.ignoreWhite = true;
subMenu.onLoad = function(success) {
if (success) {
newsText = String(this.firstChild.childNodes[0].childNodes[0].childNodes[0]);
}
};
subMenu.load("BusinessUnitData.xml");
var styleObj:TextField.StyleSheet = new TextField.StyleSheet();
styleObj.onLoad = function(success:Boolean) {
if (success) {
news_txt.styleSheet = styleObj;
news_txt.htmlText = newsText;
}
};
styleObj.load("flash.css");
Anyone explain this to me?
I have it working if the code in the news_txt variable is a String written directly into the AS, but I want to bring it in from a CDATA tag within the XML page. I have tried everything but still coming up blanks. Text shows but never any formatting.
Anyone come across something like this before?