Html与Css在Flash中的应用:
不小心看到同事Den在弄个小东西:在Flash里使用HTML和CSS,代码是这样:
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("sample.css");
content_txt.styleSheet = myStyle;
content_txt.multiline= true;
content_txt.WordWrap = true;
content_txt.html = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("sample.html");
story.onLoad = function () {
content_txt.htmlText = story;
}
myStyle.parseCSS(css_str)myStyle.setStyle(".aoao", {color:'#010101', fontWeight:'bold'});
myStyle.setStyle(".aoao:hover", {color:"#ff0000"});
(出处:http://www.dkuu.com)





