TextSnapshot
1257
When you test the SWF file, a colored rectangle surrounds the specified characters.
See also
getSelected (TextSnapshot.getSelected method)
,
setSelected
(TextSnapshot.setSelected method)
getText (TextSnapshot.getText method)
public getText(start:Number, end:Number, [includeLineEndings:Boolean]) :
String
Returns a string that contains all the characters specified by the
start
and
end
parameters. If
no characters are specified, the method returns an empty string.
To return all characters, pass a value of
0
for
start
, and
TextSnapshot.getCount()
(or any
very large number) for
end
. To return a single character, pass a value of
start +1
for
end
.
If you pass
true
for
includeLineEndings
, newline characters are inserted in the return
string where deemed appropriate, and the return string might be longer than the input range.
If
includeLineEndings
is
false
or omitted, the method returns the selected text without
adding any characters.
Availability:
ActionScript 1.0; Flash Player 7 - The SWF file must be published for Flash
Player 6 or later, and must be played in Flash Player 7 or later.
Parameters
start
:Number
- An integer that indicates the position of the first character to be included in
the returned string. Valid values for
start
are
0
through
TextSnapshot.getCount() - 1
. If
start
is a negative value,
0
is used.
end
:Number
- An integer that is 1 + the index of the last character to be examined in the
TextSnapshot object. Valid values for
end
are
0
through
TextSnapshot.getCount()
. The
character indexed by the
end
parameter is not included in the extracted string. If you omit
this parameter,
TextSnapshot.getCount()
is used. If the value of
end
is less than or equal to
the value of
start
,
start + 1
is used.
includeLineEndings
:Boolean
[optional] - A Boolean value that specifies whether newline
characters are inserted (
true
) or are not inserted (
false
) into the returned string. The default
value is
false
.
Returns
String
- A string that contains the characters in the specified range, or an empty string if no
characters are found in the specified range.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...