![MACROMEDIA Flash Lite 2 Скачать руководство пользователя страница 677](http://html1.mh-extra.com/html/macromedia/flash-lite-2/flash-lite-2_reference_687553677.webp)
TextField
677
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 ActionScript 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." of "+my_txt.maxscroll;
};
scrollDown_btn.onRelease = function() {
my_txt.+;
scroll_txt.text = my_txt." of "+my_txt.maxscroll;
};
See also
hscroll (TextField.hscroll property)
,
maxscroll (TextField.maxscroll
property)
selectable (TextField.selectable property)
public selectable :
Boolean
A Boolean value that indicates whether the text field is selectable. If the value is
true
, the text
is selectable. The
selectable
property controls whether a text field is selectable, not whether
a text field is editable. A dynamic text field can be selectable even if it is not editable. If a
dynamic text field is not selectable, you cannot select its text.
If
selectable
is set to
false
, the text in the text field does not respond to selection
commands from the mouse or keyboard, and the text cannot be copied using the Copy
command. If selectable is set to
true
, the text in the text field can be selected using the mouse
or keyboard. You can select text this way even if the text field is a dynamic text field instead of
an input text field. You can also copy the text using the Copy command.
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...