/ Published in: ActionScript

load in XML and style the text via CSS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// init TextArea component blurb.html = true; blurb.wordWrap = true; blurb.multiline = true; blurb.label.condenseWhite=true; // load CSS madrastyle = new TextField.StyleSheet(); madrastyle.load("madra.css"); blurb.styleSheet = madrastyle; // load in XML XMLcontent = new XML(); XMLcontent.ignoreWhite = true; XMLcontent.load("kungfu.xml"); XMLcontent.onLoad = function(success) { if(success) { blurb.text = XMLcontent; } }
Comments
