Simple HTML Text
forked from ff: おみくじ (diff: 30)
ActionScript3 source code
/**
* Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/hCTX
*/
package
{
import flash.text.engine.TextLine;
import flash.text.TextField;
import flash.display.Sprite;
public class SimpleHTML extends Sprite {
public var a:TextField;
public var myText:String = new String(
/**/ "<b> This is a simple way to implement HTML text into AS3. </b>" +
/**/ "<b> This is a simple way to implement HTML text into AS3. </b>"
)
public function SimpleHTML() {
a = new TextField();
a.width = 450;
a.height = 450;
a.htmlText = myText;
//--> Or, you can add string here directly like this:
// "<b> This is a simple way to implement HTML text into AS3. </b>";
stage.addChild(a);
}
}//class
}//package