×

平面设计

flash调用html文件

管理员 管理员 发表于2010-02-23 浏览2738 评论0

var ss:TextField.StyleSheet = new TextField.StyleSheet();
ss.load("sample.css");
//导入CSS,你所用到的sample.html就用到了这个CSS样式
content.styleSheet = ss;
//设置动态文本的样式表
content.multiline = true;
//多行
content.wordWrap = true;
//可选
content.html = true;
//呈现为HTML
story = new XML();
story.ignoreWhite = true;
story.load("sample.html");
//调用sample.html
story.onLoad = function() {
    //如果调用成功则执行下面的语句
    content.htmlText = story;
};