=================================
=================================
=================================
public static var HT_HEAD_S:String = "<html><head></head><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' bgcolor='#ebeef2'><div class='talk_list'>";
public static var HT_HEAD_E:String = "<br></div></body></html>";
public function loadHtml():void
{
var myCSS:StyleSheet = new StyleSheet();
myCSS.setStyle("body", {fontSize:'18',color:'#D1D2D5', fontWeight:'bold'});
myCSS.setStyle("body", {fontSize:'15',color:'#000066'});
myCSS.setStyle("h1", {fontSize:'25',color:'#000000'});
myCSS.setStyle("h2", {fontSize:'19',color:'#000000'});
myCSS.setStyle("a:link", {color:'#0000CC',textDecoration:'none'});
myCSS.setStyle("a:hover", {color:'#0000FF',textDecoration:'underline'});
myCSS.setStyle("b", {fontWeight:'bold'});
myCSS.setStyle("em", {fontWeight:'bold'});
myCSS.setStyle("bodychat", {fontFamily:'HYHeadLine-M', fontSize:'18',color:'#D1D2D5', fontWeight:'bold'});
var _webdata:String = "";
var _chatView:TextField = new TextField();
_webdata = HT_HEAD_S;
temData = " <bodychat>"+"안녕하세요."+"</bodychat>"
_webdata = temData + HT_HEAD_E;
_chatView.htmlText = _webdata;
_chatView.styleSheet = myCSS;
}
참조 사이트:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/StyleSheet.html
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlText
=================================
=================================
=================================
'ADOBE > ActionScript' 카테고리의 다른 글
플래시 AS3.0 array sort 정렬 관련 (1) | 2012.02.07 |
---|---|
[AS] 플래시 AS3.0 보안, 샌드박스 관련 (0) | 2012.02.02 |
플래시 - as3.0 플래시 안에서 swf 플래시 로드하기 (0) | 2012.01.30 |
플레시에서 개행문자의 처리 (0) | 2012.01.16 |
[AS] 플래시 AS3.0 폰트 가져와서 쓰기 (0) | 2012.01.16 |
댓글 영역