Use CSS to in TextField : StyleSheet : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » StyleSheet »

 

Use CSS to in TextField


 

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.navioo.com'>Website</a>";
      
        addChild(field);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» StyleSheet