TextFormat
1241
var format2:TextFormat = new TextFormat();
format2.letterSpacing = 10;
mytext.text = "Eat at \nJOE'S.";
mytext.setTextFormat(0, 7, format1);
mytext.setTextFormat(8, 12, format2);
If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth()
method, which is
used in this example.
rightMargin (TextFormat.rightMargin property)
public rightMargin : Number
The right margin of the paragraph, in points. The default value is
null
, which indicates that
the property is undefined.
Availability:
ActionScript 1.0; Flash Player 6
Example
The following example creates a text field and sets the right margin to 20 points.
this.createTextField("mytext",1,100,100,100,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
var myformat:TextFormat = new TextFormat();
myformat.rightMargin = 20;
mytext.text = "this is my first test field object text";
mytext.setTextFormat(myformat);
size (TextFormat.size property)
public size : Number
The point size of text in this text format. The default value is
null
, which indicates that the
property is undefined.
Availability:
ActionScript 1.0; Flash Player 6
Example
The following example creates a text field and sets the text size to 20 points.
this.createTextField("mytext",1,100,100,100,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...