Property
getTransform()
loadSound()
TextField class
Text fields are visual elements on the Stage that let you display text to a user. Similar to an
input text field or text area form control in HTML, Flash lets you set text fields as editable
(read-only), allow HTML formatting, and enable multiline support.
You use the TextField class to create text fields. All dynamic and input text fields in a SWF file
are instances of the TextField class. You can give a text field an instance name in the Property
inspector and use the methods and properties of the TextField class to manipulate it with
ActionScript. TextField instance names are displayed in the Movie Explorer and in the Insert
Target Path dialog box in the Actions panel.
To create a text field dynamically, do not use the
MovieClip.createTextField()
The methods of the TextField class let you set, select, and manipulate text in a dynamic or
input text field that you create during authoring or at runtime.
All properties of the TextField class are supported in Flash Lite 2.0, but you can only use text
fields to display device fonts. Device fonts are special fonts in Flash that are not embedded in
a SWF file. Flash Lite uses whatever font on the mobile device most closely resembles the
device font. Because font outlines are not embedded, a SWF file size is smaller than using
embedded font outlines. However, because device fonts are not embedded, the text that you
create with these fonts looks different than expected on devices that do not have a font
installed that corresponds to the device font. Flash includes three device fonts: _sans (similar
to Helvetica and Arial), _serif (similar to Times Roman), and _typewriter (similar to Courier).
For more information about the TextField class, see the following references:
Developing Flash Lite 2.x Applications
■
Chapter 12, "Working with Text and Strings," in Learning ActionScript 2.0 in Flash
■
Chapter 2, "ActionScript Classes," in Flash Lite 2.x ActionScript Language Reference
■
Description
Returns the value of the previous
not supported for device sound.
Loads sound data of any format into Flash Player. This method is
different from the Flash Player 7 version because sound data loaded
using this method is always treated as event sound, so the second
parameter of this method is always ignored. For example, in the
following call, the value true is ignored:
my_sound.loadSound("mysnd.mp3", true);
.
setTransform()
operator; instead, use
NEW
call. This method is
TextField class
29
Need help?
Do you have a question about the FLASH 8-INTRODUCTION TO FLASH LITE 2.X ACTIONSCRIPT and is the answer not in the manual?