Transform.matrix on text boxes?
Changing the scale to (2, .5) in the transform.matrix text box just makes the font uniformly large. Disappointment. Many other transformations just make the text disappear.
I am embedding fonts that need to be able to rotate the text . Well, that's one kind of transformation ... I would like freedom to transform anyway.
How can I skew / convert textboxes in as3 as shapes other than rendering to bitmap at the beginning ? This solution is not optimal as it (1) results in pixelated text for many transformations; (2) makes very, very large fonts illegible due to bitmapdata size limitations.
This person removed the Flash texture completely to get the shape fonts . It's pretty cool, and pretty extreme.
source to share
Are you sure Flash gets what you embed fonts? The following works great for me:
- New FLA: Place a text box on stage and enter text into it.
- Set the text field to "enter text" and give it the instance name "tf".
- Open the "Enter characters" and click "Autocomplete" then "OK".
Add the following script frame:
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 the movie now results in a text field that is noticeably stretched out. If that doesn't work for you, I would guess that Flash does not consider an embedded font, which can happen for several reasons (which I would guess if this is indeed your problem).
source to share