Chapter 12 Working with Text. Text Field Types Static text – used to display information or to...

21
Chapter 12 Working with Text

Transcript of Chapter 12 Working with Text. Text Field Types Static text – used to display information or to...

Chapter 12

Working with Text

Text Field Types

• Static text – used to display information or to label buttons, forms, or navigation.

• Dynamic text – used to show up-to-date information that is generated automatically from an external text file or a database.– “Welcome, Marty Stockbauer”

• Input text – text that the end user is required to input such as a username and password, forms, and surveys.

Text Field Boxes

• Static text boxes are:– Defined – identified by a square handle– Extending – identified by a round handle. You

can switch a text field from an extending text field to a defined text field by double-clicking the handle.

Text Attributes

• Text Type menu – Static, dynamic, or input text

• Font – style of type

• Character Spacing (tracking/kerning) – allows you to adjust the space between characters.

• Character Position (Baseline Shift) – Normal, Superscript, or subscript

Text Attributes

• Font Size – size of font

• Auto Kern – controls the spacing between pairs of characters. Checking this box will automatically use the font’s built-in kerning information

• Alias Text – allows you to hide the anti-aliasing to make small text sharper and easier to read

Text Attributes

• Text (Fill) Color – Allows you to choose the color of text

• Bold

• Italic

• Text Orientation – Horizontal, Vertical Left to Right, Vertical Right to Left.

• Alignment – Left, Center, Right, Full

Text Attributes

• Rotation – change the rotation of vertical text

• Format options – options for formatting text blocks

• Width and Height

• X & Y position – displays position where 0,0 is top left of stage

• URL link – Creates a hyperlink

Text Attributes

• Line Type – Single, Multiline with word wrap, Multiline No Wrap, and Password. Only available for Dynamic and Input text.

• Selectable text – allows a user to select your text and copy it.

• Render as HTML – preserves Rich Text Formatting

• Show Border – displays black border around dynamic and input text fields

Text Attributes

• Use Device Fonts – when checked, Flash will prevent the font information from being embedded. When unchecked, Flash will embed font information for any fonts used within a Static text field.

• Variable – variable name for dynamic or input text

• Target – Used with URL – new window, etc.• Character options – used with Dynamic or Input

to choose how the font will be embedded.

To Kern or Not to Kern?

• Kerning sets the distance between characters. Flash will not automatically kern the characters unless you check the Auto kern check box. Use Auto Kern when typing paragraphs of text.

• Character Spacing can also be used to adjust the space between characters

Text in Flash

• Note that unlike HTML, Flash text is not searchable by search engines. To allow keywords to be seen by search engines, you need to add Meta tags to the HTML document that the SWF file resides in.

Working with Static Text & Device Fonts

• When you add Static text to your movie, Flash will embed the font outlines in the SWF file for the font you are using. This can add a measurable amount to the file size of the SWF.

• To achieve a small file size, you can select Device Fonts. A device font won’t embed itself in the SWF file. Instead, you choose a device font for the end users’ machines to display.

Checking Text Spelling

• Check the spelling of text by choosing Text > Check Spelling.

• This doesn’t work with text that has been broken apart.

• NEVER, NEVER publish a document with misspelled words!

Using the Bandwidth Profiler

• The bandwidth Profiler allows you to see estimated download speeds and the size of your file.

• Control > Test Movie

• View > Bandwidth Profiler

Embedded Fonts Vs. Device Fonts

• Advantages: The embedded font is embedded in the exported movie so the end user doesn’t have to have the fonts installed on his or her computer to see the results.

• Disadvantages: Increases the file size of the movie.• Device Fonts are special fonts that will not be embedded

in the exported movie. The Flash Player displays the text using the closest match on the end user’s computer. – _sans – similar to Helvetica or Arial– _serif – similar to Times Roman– _typewriter – similar to Courier

Alias Text Vs. Anti-Alias Text

• Anti-aliasing refers to blurring the edges to make the text appear smooth. Most digital artists prefer anti-aliased text, but at small sizes, it can appear fuzzy and blurry.

• For text that is 10 point or smaller, use alias text.

Loading a Text File into a Dynamic Text Field

• To display current information such as news, weather reports, or company information that will be updated often, you can establish a Dynamic text field. An external file holding the text is also stored and ActionScript is used to associate the two.

Loading a Text File into a Dynamic Text Field

1. Open the text file and add xxx= in row 1, column 1. This gives the text a variable name. A variable is a container that holds information such as name=“Marty”;

2. Create a dynamic text field in your Flash document by

1. Selecting Text in the Toolbar, 2. Clicking in the Stage, 3. In Properties Inspector, choose Dynamic Text.4. Drag a text field on the Stage5. In Properties Inspector, Var: enter the name of the

variable that you assigned to the text file.

Loading a Text File into a Dynamic Text Field

3. Now, you must give Flash the name of the external file and the location of where that text field resides within your movie.

1. On Main Timeline, create an actions layer2. Select Frame 1 of the Actions layer.3. In the Actions Pane, choose Global

Functions>Browser/Network and double-click loadVariables.

4. Between the (), type “filename”,thisEx. loadVariables(“textFileLearning.txt”,this);

Working with Dynamic Text and HTML

• Flash supports the following HTML tags in Dynamic and Input text fields:– <a> anchor <img>=image– <b> bold <li> list item– <font color> <p> paragraph– <font face> <br> line break– <font size> <u> underline– <i> italic <a href=“ “> hyperlinks

Working with Input Text

• Input text fields allow you to input text into them, much like an HTML form.