To get to the Text Field interface, you first have to select the Text tool either by going to the large letter A on the toolbar, or by pressing the letter T on the keyboard. When you have selected the Text tool, the Properties Inspector will look like Figure 15.1.
Figure 15.1. The text field interface.
Most of the options are the general variety of font options such as size, font type, font size, alignment, and color. Some of the other options that you may not be familiar with are on the Text Field type drop-down menu, which includes three options:
All three of these types of text fields will be reviewed in greater detail in the next section.
An upgraded option to text fields is the anti-aliasing options:
In order to use the Custom Anti-Aliasing option, you must publish to the Flash 8 player, and this option will embed the font into the SWF and increase the file size.
And when selecting the Use Device Fonts option, remember there are three built-in device fonts that Flash already has:
The important thing to consider when choosing this option is your audience. And play around with the settings before you decide which anti-alias to use, if any.
And when embedding fonts, you can control which glyphs to use by pressing the Embed button in the Properties Inspector, which will launch the Character Options as in Figure 15.3. You can specify a range of characters such as Uppercase or Numerals. You can also include only a few select characters you type in, or have the menu select the characters you are already using by clicking the Auto Fill button.
Figure 15.3. The Character Options menu for dynamic and input text fields.
But remember, embedding fonts will increase the file size roughly 100 bytes or more per glyph, so only embed the characters you are sure you will use.
Another option on the text field interface you may not be familiar with is the text direction option that will allow text to be both horizontal and vertical. And when you select text to be vertical, another option becomes available right beside the text direction option. This option is the text rotation option, which will rotate the text field 90 degrees when selected. Text direction and text rotation options are only available to static text fields.
Continuing with the options, there is also the auto kern feature, which will adjust spacing between the letters automatically. There are also three buttons in the middle of the interface that control certain features of text fields:
There are also URL options, which allow you to place a link inside the text field as well as choose the URL target type.
And in the properties of dynamic and input text fields, there is also the Var field, which allows you to place a variable name to associate the content of the text field to a variable on the timeline. However, because text fields are now objects, there is a more up-to-date way of doing that, which we will discuss later in this chapter.
Spell Checking Text Fields
One of the hardest things to do from a designer/developer standpoint while building websites and Web applications is to spell check. This had plagued Flash users for some time until the release of Flash 2004, with a built-in spellchecker for text fields.
Before you start using it, you need to make sure it is set up the way you want. To get to the setup, go to Text, Spelling Setup. The Spelling Setup window will pop open as in Figure 15.4. Some of the options include what you want to spell check (it is good practice to have text fields and strings checked), which of the built-in dictionaries you would like to use, and which words to suggest, as well as which words to completely ignore. You can also set up your own personal dictionary and edit it from within Flash.
Figure 15.4. The Spelling Setup menu.
When you have your setup the way you want it (and it may take some time to get it just right), go ahead and create a static text field on the stage by choosing the Text tool and clicking somewhere on the stage. When the text field has been created, type in the word thier, which was meant to be their, but is a common spelling mistake (at least by me). Now go to Text and choose Check Spelling, and the Check Spelling dialog box appears as in Figure 15.5. One of the first options should be the correct spelling of the word their. Make sure that is selected and click Change. A pop-up will tell you that you're done, and now the word is spelled correctly.
Figure 15.5. The Check Spelling dialog box.
So we've covered the text field interface as well as the new Spell Checker. Now let's talk a little more about each type of text field starting with static text fields.