Font Rendering Methods In Flash Lite - MACROMEDIA FLASH 8-DEVELOPING FLASH LITE 2.X Develop Manual

Developing flash lite 2.x applications
Hide thumbs Also See for FLASH 8-DEVELOPING FLASH LITE 2.X:
Table of Contents

Advertisement

Restricting character input
You can use the
command to restrict the characters that the user can
SetInputTextType
enter in the text input dialog box. For example, suppose an application contains an input text
field for users to provide a numeric value, such as their age. Furthermore, suppose that the
input text field has the variable name
. To ensure that the user enters only numeric
ageVar
values in the text input dialog box, you could add the following code to your application:
fscommand2("SetInputTextType", "ageVar", "Numeric");
When users open the input text dialog box, they will be able to enter only numeric values in
the text fields.
For more information, see
in the
entry in the
SetInputTextType
fscommand2 function
Flash Lite 2.x ActionScript Language Reference.

Font rendering methods in Flash Lite

Flash Lite can render text field fonts in any of the following ways:
Use fonts that are available on the device
You can apply a font to a text field that you
know is available on the device, or you specify one of the three generic device fonts (_sans,
_serif, or _typewriter) that are available in the Font pop-up menu. If you select a generic
device font, Flash Lite tries to match the selected generic font to a font on the device at
runtime (for example, _sans is mapped to a sans serif font, if available).
Render the font as a bitmap
Flash Lite renders bitmap text by aligning font outlines to
pixel boundaries, which makes text readable at small point sizes (such as 10 points or smaller).
This option requires that you include font outlines in the published SWF file for the selected
font. (See
"Embedding font outlines in SWF files" on page
41.)
Render the font as anti-aliased vectors
Flash Lite renders anti-aliased text using vector-
based representations of font outlines, which you embed in the published SWF file. (See
"Embedding font outlines in SWF files" on page
41.)
You select a font rendering method for a text field using the Font Rendering Method pop-up
menu located in the Property inspector. The Font Rendering Method pop-up menu contains
five rendering options; however, only three of those are available to Flash Lite developers. The
other two methods (Anti-Alias for Readability and Custom Anti-Alias) are available only to
applications that are targeting Flash Player 8 or later on desktop computers.
38
Working with Text and Fonts

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents