User Guide
TextField.menu 733
TextField.maxscroll
Availability
Flash Player 6.
Usage
TextField.maxscroll:Number
Description
Read-only property; indicates the maximum value of TextField.scroll.
Example
The following example sets the maximum value for the scrolling text field my_txt. Create two
buttons,
scrollUp_btn and scrollDown_btn, to scroll the text field. Add the following
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;
};
TextField.menu
Availability
Flash Player 7.
Usage
my_txt.menu = contextMenu
Parameters
contextMenu
A ContextMenu object.
Description
Property; associates the ContextMenu object contextMenu with the text field my_txt. The
ContextMenu class lets you modify the context menu that appears when the user right-clicks
(Windows) or Control-clicks (Macintosh) in Flash Player.