9.
To use the application, press the emulator's select key to open the text input dialog box and
enter some text using your computer's keyboard. Then click OK to close the dialog box.
The text that you entered appears in the
Creating scrolling text
(Flash Professional only)
Flash Lite supports the
you create scrolling text fields. The
block; you can get and set its value. For example, the following code scrolls the text field
whose variable name is
story_text.scroll += 5;
The
property specifies the first visible line in a text block when the last line of the
maxscroll
text is visible in the text block; this property is read-only. You can compare a text field's
property to its
maxscroll
text field. This is useful if you want to create a scroll bar that provides feedback about the
user's current scroll position relative to the maximum scroll position.
To create a scrolling text field and control it with ActionScript:
1.
In Flash, create a new document from the Flash Lite 2.0 Generic device template that you
created earlier. (See "Creating a Flash Lite document template (Flash Professional only)" in
Getting Started with Flash Lite 2.x).
2.
Using the Text tool, drag a text field approximately the size shown in the following image
on the Stage:
3.
Select Multiline from the Line Type pop-up menu in the Property inspector.
4.
Select Dynamic Text from the Text Type pop-up menu in the Property inspector.
44
Working with Text and Fonts
and
TextField.scroll
property specifies the first visible line in a text
scroll
down by five lines:
story_text
property to determine how far a user has scrolled within a
scroll
text field in italics.
messageTxt
TextField.maxscroll
properties, which let
Need help?
Do you have a question about the FLASH 8-DEVELOPING FLASH LITE 2.X and is the answer not in the manual?
Questions and answers