Recipe 7.3. Making Text Follow a Curve


Problem

You want to add to your Flash movie text that follows a curve.

Solution

Use another application like Freehand or Illustrator to create text that follows a path, and then import that content into the Flash document.

Discussion

Flash does not currently allow you to attach text to a path or curve as other drawing applications do. However, you can use another program such as Freehand or Illustrator to create the text as you want it, and then import that text as paths into your Flash document.

With both Freehand and Illustrator you have two options. First of all, Flash allows you to import both Freehand and Illustrator (versions up to Illustrator 10) files directly. You can select File Import to Stage or File Import to Library, and then select the file that you want to import.

First, let's look at what you need to consider when you import a Freehand file. When you try to import, you will be presented with the Freehand Import dialog box, and you will be prompted to make a few choices. For single-page Freehand documents, the first two sections don't necessarily apply. But if you look at the third section, Options, you will see an option to Maintain Text Blocks. Make sure this box is unchecked. In the case of text attached to a curve, this option should not make a difference, because the text will be imported as paths (meaning that it's no longer editable text) regardless. But for other kinds of text, such as subscripted and superscripted text, if you leave the box checked, Flash will not import the text as you want it to appear.

If you use Illustrator, you can also import those files into Flash (up to Illustrator 10). Just as with Freehand files, you select the Import or Import to Library option from the File menu, and select the Illustrator file that you want to import. The Illustrator Import dialog box does not give you an option to convert text to outlines, so if you need to ensure that your text will display properly in Flash, you must convert the fonts to outlines in the Illustrator file itself.

In addition to allowing you to import Freehand and Illustrator files, Flash also allows you to import .swf files. And both Freehand and Illustrator allow you to export to the SWF format. When you export a Freehand or Illustrator file to an SWF, the resulting SWF contains all the text as outlines.

As an alternative, you can also create your text in an application, such as Fireworks or Photoshop, save it as an image file (PNG works well), and import the image file into Flash. Use this option only if you don't have a vector-drawing application like Freehand or Illustrator. Using vector-based applications allows you to import shapes and paths into your Flash movie. Shapes and paths scale well and require minimal file size. Images, on the other hand, do not scale well (they get pixelated) and they require more file size. If you save the text from Fireworks (or whatever application you use) as a PNG, Flash will give you some options when you import it. Make sure that you select the "Rasterize if Necessary to Maintain Appearance" option in the Text options section.

It's worth noting that you can manually place text along a curve using Flash. However, it can be a painstaking operation. The steps are as follows:

  1. Use one of the drawing tools to draw a curve, and make the layer a guide layer.

  2. Make a text field with the text value you want to attach to a curve.

  3. Select the text field, and select Modify Break Apart to break it into individual text fields for each character.

  4. Use the Free Transform tool to rotate the characters to the curve.




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net