Scroll (Textfield.scroll Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
In this example, you need to create a dynamic text field called
, and then use the
my_txt
following ActionScript to embed fonts and rotate the text field. The string
refers to a
my font
font symbol in the library, with a linkage identifier of
.
my font
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "my font";
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160,
120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;
Apply additional formatting for the text field using the
.
TextFormat class
See also
,
_rotation (Button._rotation property)
_rotation (MovieClip._rotation
,
property)
TextFormat

scroll (TextField.scroll property)

public scroll :
Number
Defines the vertical position of text in a text field. The scroll property is useful for directing
users to a specific paragraph in a long passage, or creating scrolling text fields. This property
can be retrieved and modified.
The units of horizontal scrolling are pixels, while the units of vertical scrolling are lines.
Horizontal scrolling is measured in pixels because most fonts you typically use are
proportionally spaced; meaning, the characters can have different widths. Flash performs
vertical scrolling by line because users usually want to see a line of text in its entirety, as
opposed to seeing a partial line. Even if there are multiple fonts on a line, the height of the
line adjusts to fit the largest font in use.
Availability: ActionScript 1.0; Flash Lite 2.0
676
ActionScript classes

Advertisement

Table of Contents
loading

Table of Contents