We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

chrisaiv on 02/20/07


Tagged

stylesheet letterSpacing TextField


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.