| < Day Day Up > |
|
In Flash, you can use Type 1 PostScript fonts, TrueType fonts, and bitmap fonts (Mac only). You'll find that for PCs the TrueType fonts are most reliable and that the PostScript fonts can be problematic for both the Windows and Mac platforms. Be sure to test all fonts on your machine and also from a server, preferably on a computer that may not have the same fonts installed to test in real-world situations. If the user doesn't have the font and you haven't taken that into consideration, your design could fall apart. Later in this chapter, you learn how to ensure that everyone sees your movie exactly the way you want it to look.
To use the Text tool, follow these steps:
Select the Text tool.
Start typing on the Stage. Notice the text box that the text is in. There are three types of text boxes available:
Extending — The default. This box extends as you type.
Fixed — A fixed text box does not extend horizontally. To make a fixed text box, use the Text tool and click and drag until the outline shows the size you want. Text in a fixed text box automatically wraps vertically.
Tip | You can also adjust the width by pixels in the Property inspector after you've made the fixed text box. Select it and change the Width property. |
Input — This text box is used for user input or for dynamically generated text from a database. To add an input text box, you change any text box's property in the Property inspector as shown in Figure 25-6.
Figure 25-6: A selected text box being changed to an input text box
Note | An input text box is used for the Flash interface for the Habit Alert site, and a dynamic text box is used on each e-card to accept the user input for the cards. |
The text properties are similar to the rest of the Studio MX applications but there are some exceptions. You take a look at each of the Property inspectors for static text, dynamic text, and input text. Figure 25-7 shows the Property inspector when you use the default of Static text.
Figure 25-7: The Property inspector for static text
Some of the fields include
Character Spacing, which is also known as kerning. This option enables you to add or delete space between characters.
Character Position is also known as Baseline shift. This option determines where the bottom of the text sits.
Change Direction of Text changes the text's orientation horizontally and vertically.
Rotate text.
URL field.
Selectable button is used when you want the user to be able to select, copy, and paste your text.
Use Device Fonts allows Flash to use an appropriate font from the user's system.
Format button, when clicked, presents a dialog box where you can enter line spacing and margin information.
Figure 25-8 shows the Property inspector when Dynamic Text is selected. The first thing to notice is that there is an Instance Name field. You name the instance in the Property inspector. By naming it, you can reference it when you begin to add ActionScript.
Figure 25-8: The Property inspector as it appears when Dynamic Text is selected
The other changes to the Property inspector include
Line Type — You can choose whether you want single, multiple lines, or multiple lines without a wrap. The definitions for these options are
Single line — One line of text without any wrapping.
Multiline — Multiple lines of text that wrap.
Multiline no Wrap — Multiple lines that don't wrap unless the Enter/Return key is pressed.
Variable — An additional field to enter a unique name so you can code the dynamic text to go to the right text box.
Render Text as HTML button — You can retain certain HTML tags, such as bold, italic, underline, font, color, paragraph, and font size.
Show Border Around Text — This adds a border around the text box.
Note | When you choose to show a border you'll see it in Flash, but if you choose not to you'll see a dotted border around the text box in Flash, but it doesn't export with your movie. |
Character button — This is used to enter information about font embedding.
Caution | The more characters you embed, the larger the file size will be. |
The Input Text properties are similar to the dynamic text properties. The difference is that input text goes from the user's browser into a database and dynamic text goes from the database on a server to the user's browser. There are two additional options in the Property inspector (Figure 25-9) when you choose Input Text:
Password — In the Line Type drop-down menu there is an additional option of Password. This option displays the onscreen text as asterisks for security. You need to add the ActionScript to pass the information, however. This option only affects the onscreen view of the entered text.
Maximum Character field — In this field, you can limit the number of characters users can enter into the input text box.
Figure 25-9: The Property inspector when Input Text is selected
Breaking text apart into individual letters can be useful. By breaking them apart, you can edit the individual letters, but more importantly, you can animate the letters.
Caution | After text is broken apart it is no longer editable as text, and the file size is larger. |
To break text apart, follow these steps:
Select a block of text.
Choose Modify ® Break Apart. Each letter can be manipulated separately.
If you want to alter the individual letters, select one and choose Modify ® Break Apart again.
Select the Subselection tool, and select the letter you broke apart again. You'll see each point of the letter, which you can alter.
| < Day Day Up > |
|