Using Text2Curve component in Flash IDE.
To place text along curve (circle in this tutorial) at authoring time, follow these steps:
- Open a new Flash document (select File > New).
- Place an instance of Text2Curve component on the scene. Select it (click the semi-transparent rectangle - bounding box).
- Open Component Inspector (Window > Development Panels > Component Inspector or Alt+F7). While the most important parameters are available also in Properties panel, it's more comfortable to use Component Inspector.
- Sometimes newly placed instance of Text2Curve will not show text outside the bounding box (Fig.1, a). Just click several parameters in Component Inspector (or enter new values as described below) to update the view (Fig.1, b).
Fig.1. New instance of Text2Curve: a)just placed; b)updated view; c)with new text.
- Enter parameters (most important shown in bold):
- Text to Show - The text to be placed along the curve.
- Text Color - The color of the text.
- Text Size - The point size of text.
- Font Name - Instance name of a movie clip which is front instance of blend group.
- Curve Type - The type of a curve. Can be one of pre-defined values: "arc_round" (default), "arc_ellipse" and "wave_sine". See
Text2Curve.curveType property description for details.
- Curve Parameters - Parameters for the curve.See
Text2Curve.curveParam property description for details.
- Orient To Path - A Boolean value that indicates whether letters are rotated to be perpendicular to the curve.
- Show Curve - A Boolean value that indicates whether curve is visible.
- Curve Color - The color of the curve's line. Default is 0xCCCCCC (grey).
- Line Width - The width of a curve's line.
- Rotation - The angle of rotation (in degrees) for the whole text group.
- Embedding fonts.
If you try to publish movie right now, you'll see no text. To display text, do one of the following:
See Flash help files for more information on embedding fonts or creating font symbols.
- Create a font symbol in the library and set linkage identifier for it. This linkage identifier must be the same you entered as Font Name.
This way is fast and simple, while can result in larger SWF file size (the whole font is embedded).
- Embed font characters for one of dynamic test fields on the stage.
Using this way you can embed just characters you need. For example, only lowcase gliphs. If list of necessary characters is defined at authoring time, this way is recommended for advanced developers.
- Now you can publish the movie - your text will be accurately placed along the curve.
- Changing parameters and adjusting the component.
Sometimes you will need to change the Text2Curve component's look in the IDE. Some rules:
- Publish your movie to see the result. Play with values to get desired results.
You can see some working samples available at the component website.