Document.gettextstring() - MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual

Flash javascript dictionary
Hide thumbs Also See for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY:
Table of Contents

Advertisement

Example
The following example gets the bounding rectangle for the current selection and then displays its
properties:
var newRect = fl.getDocumentDOM().getSelectionRect();
var outputStr = "left: " + newRect.left + " top: " + newRect.top + " right: " +
newRect.right + " bottom: " + newRect.bottom;
alert(outputStr);

document.getTextString()

Availability
Flash MX 2004.
Usage
document.getTextString( [startIndex [, endIndex]] )
Parameters
An integer that is an index of first character to get. This parameter is optional.
startIndex
An integer that is an index of last character to get. This parameter is optional.
endIndex
Returns
A string that contains the selected text.
Description
Method; gets the currently selected text. If the optional parameters are not passed, the current text
selection is used. If text is not currently opened for editing, the whole text string is returned. If
only
startIndex
returned. If
startIndex
but not including,
If there are several text fields selected, the concatenation of all the strings is returned.
Example
The following example gets the string in the selected text fields:
fl.getDocumentDOM().getTextString();
The following example gets the string at character index 5 in the selected text fields:
fl.getDocumentDOM().getTextString(5);
The following example gets the string from character index 2 up to, but not including, character
index 10:
fl.getDocumentDOM().getTextString(2, 10);
is passed, the string starting at that index and ending at the end of the field is
and
endIndex
is returned. See
endIndex
are passed, the string starting from
document.setTextString()
up to,
startIndex
.
Document object
95

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents