Adding Text

I l @ ve RuBoard

You can use the text tool to add static, dynamic, or input text to your movie. In this exercise you'll add some static text, and you'll use the Property inspector to modify the settings for that text.

You should have zoo5.fla open from the previous exercise.

  1. Select the text tool from the toolbox. In the Property inspector set the Font to Verdana, the Font Size to 10, Character Spacing to 2, and Text (fill) Color to #CC0000 (red).

    To set the Font Size and Character Spacing, you can either type the desired value in the box, or drag the slider to the right of the text box up or down until you get the desired value.

    You should have no trouble setting the Text (fill) Colorit works much like the stroke and fill color settings. Click the Text (fill) Color box and either type the hexadecimal number for the color you want in the space provided, or choose the color from the color pop-up.

    Leave all the other settings in the Property inspector in their default positions . Specifically, bold and italic should not be selected, the Character Position should be Normal, the URL link box should be empty. The Text Direction should be horizontal, and the text should be left justified. You should also deselect the Auto Kern option if it's selected.

    graphics/02fig36.gif

    It's important to consider the font when you add text in Flash. When adding static text, if you use a font that is installed on your system, the characters that you add are embedded in the file. This will ensure that the font is displayed exactly as it's displayed on your computer, regardless of whether the person viewing the finished movie has that font installed. Not all fonts can be exported with a movie. A quick test to see if a font can be embedded is to choose View > Antialias Text. If the text becomes jagged, Flash cannot embed the font.

    You can also use device fonts, namely _sans, _serif, and _typewriter in your movies. Device fonts are not embedded in Flash .swf file; rather the Flash Player uses whatever font most closely resembles the device font. Device fonts are not anti-aliased (edges smoothed out), so they can be sharper and more legible than embedded fonts at small point sizes (below 10 points). Because different computers have different device fonts, the text may appear differently on a different computer.

    If you like the sharp look of a smaller device font but want to make sure that your text appears the same on every computer, you should use a pixel font. Pixel fonts are specially designed fonts that appear aliased, making them much more legible at smaller sizes. Appendix C lists several Web sites that have more information about pixel, and other, fonts.

  2. Click the stage and type Our Newest Addition . Select the arrow tool and click the text box to select it.

    When you click the stage, a text box appears. Anything you type appears in that text box, using the properties you set in the Property inspector.

    graphics/02fig37.gif

    When you add static text to the stage, you can click and type to create a text box with a single line that expands as you type, as you did in this step. Or you can click, drag, and type to create a fixed-width block (for horizontal text) or fixed-height block (for vertical text) that expands and automatically wraps words. When adding or editing text in a text box, Flash displays a handle at the top-right corner of the text box to identify its type. Text boxes that extend have a round handle and text boxes with a defined height have a square handle.

    graphics/02fig38.gif

    When you use the text tool, you can't just press V to switch to the arrow tool, because the letter v will appear in the text box. And if you don't switch to the arrow tool before you click the stage, Flash will create another text box.

    If you accidentally double-click the text box you just created, Flash will switch back to the text tool. Make sure that you click the text box just once.

  3. Use the Property inspector to set the X and Y of the selected text box to 85 and 190, respectively.

    The text box is now just above the rectangle on the left.

  4. Deselect the text box and select the text tool again. In the Property inspector, change the Character Spacing to 0 and the Text (fill) Color to black (#000000).

    Leave all the other settings as they were for the last text box. If you don't deselect the text box before you make these changes in the Property inspector, the selected text box will have the changes applied to it. You don't want this to happenit looks nice the way it is! So just click outside it to deselect the text box and then make the changes.

  5. Click the stage and drag to the right to create a text box that's just a bit smaller than the rectangle on the left side of the stage in the Welcome Text layer. Add some text to this new text box.

    graphics/02fig39.gif

    It doesn't matter what you type in this text box, as long as it's enough text to demonstrate that the fixed-width text box will automatically wrap words. The text that was used in the source file on the CD is as follows :

    Please welcome the newest addition to ZooMX, a baby cheetah by the name of Astra. Cheetahs have been hunted nearly to extinction in the wild, and the arrival of baby Astra is a rare and special event. You can visit Astra daily from noon until 1PM at the Conservation Building.

  6. Select the arrow tool. Position the text box that you just added inside of the rectangle on the left side of the stage.

    graphics/02fig40.gif

    You can use the Align panel to position the text box so that it lines up with the text box you added earlier in this exercise. Just select both text boxes and click the Align Left Edge button in the Align panel. This will line up the text boxes on the farthest-left edge. Play around with the settings in the Align panel until you like the way text box looks. If you make a change, and it doesn't look great, just choose Edit > Undo or press Ctrl+Z (Windows) or Command+Z (Macintosh).

    NOTE

    The Align panel should be on the right side of the screen, where you placed it in Lesson 1. If you can't find it, choose Window > Align to open it again.

    graphics/02fig41.gif

    If you don't want to use the Align panel to position the text box, you can use the Property inspector. Or, you can always drag it around with the arrow tool until you find the position you want.

  7. Duplicate the text box containing the text Our Newest Addition and position it above the rectangle on the right side of the stage. Double-click the text box and change the text to Welcome .

    graphics/02fig42.gif

    To duplicate the text box, use the arrow tool to select it, and choose Edit > Duplicate to make a copy. You can then use the arrow tool to move the text box above the rectangle on the right side of the stage. If you'd like to make sure the new text box lines up with the rectangle on the bottom, you can use the Align panelselect both text boxes and click the Align Top Edge button.

  8. Add a fixed-width text box containing some text inside the rectangle on the right side of the stage. Choose Control > Test Movie.

    graphics/02fig43.gif

    For this text box, you should use the settings you used for the text box inside the rectangle on the left side of the stage. You can quickly grab those settings using the eyedropper tool. Select the eyedropper tool from the toolbox and click the text box that has the properties you want to duplicate. The pointer will switch to the text tool's icon, at which point you can click and drag to create your fixed-width text box.

    As before, you can add any text you want. The source file on the CD uses this text:

    Welcome to ZooMX. This zoo is a fictional place, existing only in the confines of this book. But we hope that you enjoy building this site!

    When you choose Control > Test Movie, Flash creates an .swf file in the same folder where you saved your .fla file. It then opens that .swf file in a separate window and displays it in the Flash Player. This is what your Flash movie would look like if you were to prepare it for the Web right now. It's still pretty boring, but now it contains some graphics and text.

    If you don't like the way the text looks, think about how you could modify it. You could easily change the size if it's too small for your taste, or you could change the font, color, or any other setting. Don't limit your experimenting to the settings listed in these exercisesyou'll find it's much easier to learn Flash when you play around with the settings as you go through each step.

  9. Close the Test Movie window and save the file as zoo6.fla.

    You've made some major changes to your movie, so now is a great time to save your work.

I l @ ve RuBoard


Macromedia Flash MX. Training from the Source
Macromedia Flash MX: Training from the Source
ISBN: 0201794829
EAN: 2147483647
Year: 2002
Pages: 115
Authors: Chrissy Rey

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