Posted By

chrisaiv on 02/20/07


Tagged

stylesheet letterSpacing TextField as2


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

gasface
crashdr


AS2: Dynamically space out letters


 / Published in: ActionScript
 

I needed a way to dynamically space out letters. Here's an example using style sheets in Flash.

  1. _root.createTextField("test_txt", this.getNextHighestDepth(), 0, 0, 400, 100);
  2. var myCSS:TextField.StyleSheet = new TextField.StyleSheet();
  3. myCSS.setStyle(".display", {letterSpacing:'15px'});
  4. test_txt.styleSheet = myCSS;
  5. test_txt.text = '<span class="display">red_________red</span>';

Report this snippet  

You need to login to post a comment.