Scroll (Textfield.scroll Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also
_rotation (Button._rotation property)
,
property)
TextFormat

scroll (TextField.scroll property)

public scroll : Number
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 for creating scrolling text fields. This property can be
retrieved and modified.
The units of horizontal scrolling are pixels and the units of vertical scrolling are lines.
Horizontal scrolling is measured in pixels because most fonts that you typically use are
proportionally spaced, meaning that 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 Player 6
Example
The following example sets the maximum value for the scrolling text field
buttons,
scrollUp_btn
following ActionScript code to your FLA or AS file.
this.createTextField("scroll_txt", this.getNextHighestDepth(), 10, 10, 160,
20);
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 30, 320,
240);
my_txt.multiline = true;
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
and
scrollDown_btn
TextFormat class
,
_rotation (MovieClip._rotation
, to scroll through the text field. Add the
.
method.
. Create two
my_txt
TextField
1205

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF