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
method, which is
MovieClip.getNextHighestDepth()
used in this example.
rightMargin (TextFormat.rightMargin property)
public rightMargin : Number
The right margin of the paragraph, in points. The default value is
, which indicates that
null
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
, which indicates that the
null
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;
TextFormat
1241
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?