User Guide

938 Chapter 2: ActionScript Language Reference
TextField._xscale
Availability
Flash Player 6.
Usage
my_txt._xscale:Number
Description
Property; determines the horizontal scale of the text field as applied from the registration point of
the text field, expressed as a percentage. The default registration point is (0,0).
Example
The following example scales the my_txt instance when you click the scaleUp_btn and
scaleDown_btn instances.
this.createTextField("my_txt", 99, 10, 40, 100, 22);
my_txt.autoSize = true;
my_txt.border = true;
my_txt.selectable = false;
my_txt.text = "Sample text goes here.";
scaleUp_btn.onRelease = function() {
my_txt._xscale *= 2;
my_txt._yscale *= 2;
}
scaleDown_btn.onRelease = function() {
my_txt._xscale /= 2;
my_txt._yscale /= 2;
}
See also
TextField._x, TextField._y, TextField._yscale