TextRun object

 < Day Day Up > 

Availability

Flash MX 2004.

Description

The TextRun object represents a run of characters that have attributes that match all of the properties in the TextAttrs object. This object is a property of the Text object (text.textruns).

Property summary for the TextRun object

In addition to the properties available for use with the Text object, the TextRun object provides the following properties.

Property

Description

texTRun.characters

A string that represents the text contained in the TextRun object.

textrun.textAttrs

The TextAttrs object containing the attributes of the run of text.


textRun.characters

Availability

Flash MX 2004.

Usage

textRun.characters

Description

Property; the text contained in the TextRun object.

Example

The following example displays the characters that make up the first run of characters in the selected text field in the Output panel.

fl.trace(fl.getDocumentDOM().selection[0].textRuns[0].characters);

textRun.textAttrs

Availability

Flash MX 2004.

Usage

textRun.textAttrs

Description

Property; the TextAttrs object containing the attributes of the run of text.

Example

The following example displays the properties of the first run of characters in the selected text field in the Output panel.

var curTextAttrs = fl.getDocumentDOM().selection[0].textRuns[0].textAttrs; for (var prop in curTextAttrs) {   fl.trace(prop + " = " + curTextAttrs[prop]); }

     < Day Day Up > 


    Developing Extensions for Macromedia Flash 8
    Developing Extensions for Macromedia Flash 8
    ISBN: 032139416X
    EAN: 2147483647
    Year: 2005
    Pages: 81

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net