Example
See the example for
TextField.hscroll
maxscroll (TextField.maxscroll property)
public maxscroll : Number [read-only]
Indicates the maximum value of
Availability: ActionScript 1.0; Flash Player 6
Example
The following example sets the maximum value for the scrolling text field
buttons,
scrollUp_btn
ActionScript 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;
my_txt.wordWrap = true;
for (var i = 0; i<10; i++) {
my_txt.text += "Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diam nonummy nibh "
+ "euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.";
}
scrollUp_btn.onRelease = function() {
my_txt.scroll--;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
scrollDown_btn.onRelease = function() {
my_txt.scroll++;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
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
menu (TextField.menu property)
public menu : ContextMenu
Associates the ContextMenu object
ContextMenu class lets you modify the context menu that appears when the user right-clicks
(Windows) or Control-clicks (Macintosh) in Flash Player.
.
TextField.scroll
and
scrollDown_btn,
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
contextMenu
.
to scroll the text field. Add the following
with the text field
my_txt
. Create two
my_txt
method.
. The
TextField
1189
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?