MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 445

Extending flash
Table of Contents

Advertisement

Description
Method; retrieves the specified range of text. If you omit the optional parameters
startIndex
and
, the whole text string is returned. If you specify only
, the method
endIndex
startIndex
returns the string starting at the index location and ending at the end of the field. If you
specify both
and
, the method returns the string starts from
startIndex
endIndex
and goes up to, but does not include,
.
startIndex
endIndex
Example
The following example gets the character(s) from the fifth character through the end of the
selected text field:
var myText = fl.getDocumentDOM().selection[0].getTextString(4);
fl.trace(myText);
The following example gets the fourth through the ninth characters starting in the selected
text field:
var myText = fl.getDocumentDOM().selection[0].getTextString(3, 9);
fl.trace(myText);
text.length
Availability
Flash MX 2004.
Usage
text.length
Description
Read-only property; an integer that represents the number of characters in the text object.
Example
The following example returns the number of characters in the selected text:
var textLength = fl.getDocumentDOM().selection[0].length;
text.lineType
Availability
Flash MX 2004.
Usage
text.lineType
Text object
445

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents