Leading (Textformat.leading Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

fmt2.size = 50;
fmt2.color = 0x0000FF;
fmt2.kerning = true;
this.createTextField("tf1", this.getNextHighestDepth(), 10, 10, 400, 100);
tf1.embedFonts = true;
tf1.text = "Text 7AVA-7AVA";
tf1.setTextFormat(fmt1);
this.createTextField("tf2", this.getNextHighestDepth(), 10, 40, 400, 100);
tf2.embedFonts = true;
tf2.text = tf1.text;
tf2.setTextFormat(fmt2);
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.

leading (TextFormat.leading property)

public leading : Number
An integer that represents the amount of vertical space in pixels (called leading) between lines.
The default value is
, which indicates that the property is undefined.
null
Flash Player 8 supports negative leading, meaning that the amount of space between lines is
less than the text height. Negative leading can be useful when you want to put lines of text,
such as headings, very close together. To prevent the overlap of text, you use negative leading
for lines of text that do not contain descenders, such as text that is all uppercase.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example creates a text field and sets the leading to 10.
var my_fmt:TextFormat = new TextFormat();
my_fmt.leading = 10;
this.createTextField("my_txt", 1, 100, 100, 100, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.border = true;
my_txt.text = "This is my first text field object text";
my_txt.setTextFormat(my_fmt);
TextFormat
1239

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF