我有AS3創建的文本字段爲這樣的:(theDesc是通過函數傳遞的參數)AS3的htmlText是示出標籤
var productDescTxt:TextField = new TextField();
productDescTxt.htmlText = theDesc;
productDescTxt.multiline = true;
productDescTxt.wordWrap = true;
productDescTxt.embedFonts = true;
productDescTxt.setTextFormat(productInfoTF);
productDescTxt.x = 10;
productDescTxt.y = productNameTxt.y+productNameTxt.textHeight+15;
productDescTxt.width = 325;
holder.productsTab.addChild(productDescTxt);
theDesc
是HTML內容與字符編碼:
例如:
<p><strong>6.1 oz cotton at an affordable price</strong></p>
問題是textField正在顯示每個字符。 <p><strong>
等
是否有任何額外的編碼需要完成我的目的?
什麼theDesc看起來像在您的設置呢? – locrizak 2011-05-20 13:06:11
這是作爲一個字符串傳遞完全像我的例子。 – rson 2011-05-20 13:13:10
這樣的<p> <強> 6.1盎司棉價格合理< /強> </p >? – locrizak 2011-05-20 13:16:39