views:

310

answers:

1

Changing the scale to (2, .5) on a textfield's transform.matrix just makes the font uniformly larger. Frustrating. Many other transforms just make the text disappear.

I am embedding fonts, which is supposed to allow for rotating text. Well, that is one kind of transform... I would like the freedom to transform every which way.

Is there somehow to skew/transform textfields in as3 as shapes other than rendering to a bitmap first? This solution is not optimal since it (1) results in pixelated text for many transforms; (2) makes very, very large fonts unweildy because of the bitmapdata size constraints.

This fellow has dropped the flash text framework altogether to get fonts as shapes. This is kind of cool, and kind of extreme.

+1  A: 

Are you sure Flash gets that you're embedding fonts? The following works fine for me:

  1. New FLA: put a text field on the stage and type some text into it.
  2. Set textfield to "input text" and give it an instance name of "tf".
  3. Open the "Character Embedding" and hit "Auto fill", then "OK".

Add the following frame script:

trans(tf);
function trans( d:DisplayObject ) {
    var tr:Transform = d.transform;
    var m:Matrix = tr.matrix;
    m.scale( .5, 2 );
    tr.matrix = m;
    d.transform = tr;
}

For me, testing movie now results in a text field that is visibly stretched. If it's not working for you, my first guess would be that Flash isn't considering the font to be embedded, which can happen for a couple of reasons (that I could take a guess at if this does indeed appear to be your problem).

fenomas