EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 730

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
730 Chapter 12: ActionScript Dictionary
Description
Method; specifies the color to use when highlighting characters that have been selected with the
TextSnapshot.setSelected() command. The color is always opaque; you cant specify a
transparency value.
TextSnapshot.setSelected()
Availability
Authoring: Flash MX 2004.
Playback: SWF files published for Flash Player 6 or later, playing in Flash Player 7 or later.
Usage
mySnapshot.setSelected(from, to, select)
Parameters
from
An integer that indicates the position of the first character of my_snap to select. Valid
values for
from are 0 through TextSnapshot.getCount() - 1. If from is a negative value,
0isused.
to An integer that is 1+ the index of the last character in my_snap to be examined. Valid values
for
to are 0 through TextSnapshot.getCount(). The character indexed by the to parameter is
not included in the extracted string. If this parameter is omitted,
TextSnapshot.getCount() is
used. If this value is less than or equal to the value of
from, from+1 is used.
select A Boolean value that specifies whether the text should be selected (true) or
deselected (
false).
Returns
Nothing.
Description
Method; specifies a range of characters in a TextSnapshot object to be selected or deselected.
Characters that are selected are drawn with a colored rectangle behind them, matching the
bounding box of the character. The color of the bounding box is defined by
TextSnapshot.setSelectColor().
To select or deselect all characters, pass a value of 0 for
from and TextSnapshot.getCount() (or
any very large number) for
to. To specify a single character, pass a value of from+1 for to.
Because characters are individually marked as selected, you can issue this command multiple
times to select multiple characters; that is, using this command does not deselect other characters
that have been set by this command.

Table of Contents

Related product manuals