TextField
691
this.createTextField("width_txt", this.getNextHighestDepth(), 10, 10, 30,
20);
width_txt.border = true;
width_txt.maxChars = 3;
width_txt.type = "input";
width_txt.text = my_txt._width;
width_txt.onChanged = function() {
my_txt._width = this.text;
}
this.createTextField("height_txt", this.getNextHighestDepth(), 70, 10, 30,
20);
height_txt.border = true;
height_txt.maxChars = 3;
height_txt.type = "input";
height_txt.text = my_txt._height;
height_txt.onChanged = function() {
my_txt._height = this.text;
}
When you test the example, try entering new values into
width_txt
and
height_txt
to
change the dimensions of
my_txt
.
See also
_height (TextField._height property)
wordWrap (TextField.wordWrap property)
public wordWrap :
Boolean
A Boolean value that indicates if the text field has word wrap. If the value of
wordWrap
is
true
, the text field has word wrap; if the value is
false
, the text field does not have word
wrap.
Availability:
ActionScript 1.0; Flash Lite 2.0
Example
The following example demonstrates how
wordWrap
affects long text in a text field that is
created at runtime.
this.createTextField("my_txt", 99, 10, 10, 100, 200);
my_txt.text = "This is very long text that will certainly extend beyond the
width of this text field";
my_txt.border = true;
Test the SWF file in Flash Player by selecting Control > Test Movie. Then return to your
ActionScript and add the following line to the code and test the SWF file again:
my_txt.wordWrap = true;
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...