package {
import flash.display.Sprite;
import flash.text.TextField;
public class Main extends Sprite {
public function Main( ) {
var field:TextField = new TextField( );
var css:flash.text.StyleSheet = new flash.text.StyleSheet( );
css.parseCSS("a {color: #0000FF;} a:hover {text-decoration: underline;}");
field.styleSheet = css;
field.htmlText = "<a href='http://www.java2java.com'>Website</a>";
addChild(field);
}
}
}
|