1. Computing

Applying Transformations to Dynamic Text with Embedded Fonts


In the Magic 8-ball tutorial’s basic lesson, I used a dynamic text field to display the random message generated by the 8-ball script; however, in my completed and tweaked version of the 8-ball, the text display not only rotated, but shifted position. You’ve probably experienced the problem of transforming dynamic text more than once; no matter how hard you try, no matter how often you tweak the layer order or even try to use swapDepths on the text, the moment that you apply any transformation to it….it disappears.

This is an irritating problem, but an easily solved one; when you embed the fonts of a dynamic text field, then it can be transformed without causing the text to disappear.

Embedding fonts causes the font information (or typestyle, if you prefer) to be saved as part of the exported SWF data. This can be useful if you need to apply various transformations, but be wary; font data can range anywhere from 5KB to several megabytes, and you may want to reconsider applying transformations to dynamic text fields if it would require turning a 25KB SWF file into a 10MB one.

Turning on font embedding is just a matter of a few clicks; with the text field selected, click on the Character… button in the Properties pane for the field.

©2014 About.com. All rights reserved.