Article

Home » Design and Layout » Flash Tutorials » Flash 101 - Part 4: Don't Touch Me

About the Author

Icarus

Icarus is a technical writer with Melonfire. He likes raw fish, beer and James Bond movies.

View all articles by Icarus...

Flash 101 - Part 4: Don't Touch Me

By Icarus

April 18th, 2002

Reader Rating: 7.5

Page: 1 2 3 4 Next

Deliberate Mistakes

In the very first article of this series, I gave you a quick tour of the Flash toolbox, and explained what the various tools were used for. However, if you were paying attention, you'll know that I deliberately missed out the Text tool, used when adding text to your Flash movie.

In this week's article, I'll be spending some time with this tool, demonstrating how it can be used with the tweening techniques you learned last time to create interesting text effects. Keep reading!

The Write Way

The Text tool, activated with the keyboard shortcut T, is primarily used to insert text into your Flash movie.

730_image1

Text is placed in one or more blocks, which come in two varieties -- a fixed-width block, and a variable-width block. A variable-width block expands horizontally as you type text, while a fixed-width block has a rigid border and automatically wraps text to the next line when it reaches the border.

In order to create a variable-width block, simply activate the Text tool and begin typing on the Stage.

730_image2

In order to create a fixed-width block, you need to first draw the outline of the block on the Stage by click-dragging the mouse pointer with the Text tool active. Once the block is defined to your requirements, click within it to begin inserting text.

730_image3

You can easily alter the characteristics of the inserted text via the Window -> Panels -> Character panel -- this panel allows you to specify attributes like typeface, colour, size, emphasis and tracking.(the space between individual characters of the font). You can also adjust the character position -- normal, superscript or subscript -- and, in the case of paragraphs, the alignment, margin widths and line spacing.

Flash also allows you to create dynamic text boxes, and text boxes which accept user input. You can play with these by selecting the appropriate option in the Text Options tab of the Character panel -- they'll be explained in detail later.

730_image4

High Fidelity

There is an important point to be noted here, related to your usage of fonts within your Flash movie. Typically, the fonts that you use are embedded within the Flash movie, so that they appear correctly in the user's browser; this adds to the file size of the final .SWF file, but ensures maximum fidelity when the movie is played back.

The alternative here is to use Flash's in-built "device fonts", generic fonts in the "sans", "sans-serif" and "monospace" font families. These fonts are named _sans, _sans-serif and _typewriter in the font selection box of the Character panel, and using them can substantially reduce the size of your Flash file. The downside: since these fonts are not embedded within the file, the Flash player will "approximate" to the most similar font found on the user's system, and display text in that font. Obviously, this means a loss in fidelity, since text in the final Flash movie may look completely different from the original.

To use device fonts, check the "Use Device Fonts" option in the Text Options tab of the Character panel. You'll also see a check box below that marked "Selectable" -- check this if you'd like the user to be able to select the text as it appears in the final Flash movie.

Finally, you can link text blocks to Web site URLs -- simply enter a URL into the URL field on the main Character panel. Here's an example:

Copyright Melonfire, 2000. All rights reserved.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links