User Guide

584
Example
This statement selects cast members 1 through 10 in castLib 1:
castLib(1).selection = [[1, 10]]
This statement selects cast members 1 through 10, and 30 through 40, in castLib 1:
castLib(1).selection = [[1, 10], [30, 40]]
selection (text cast member property)
Syntax
member(whichTextMember).selection
Description
Text cast member property; returns a list of the first and last character selected in the text cast
member.
This property can be tested and set.
Example
The following statement sets the selection displayed by the sprite of text member myAnswer so
that characters 6 through 10 are highlighted:
member("myAnswer").selection = [6, 10]
See also
color(), selStart, selEnd
selEnd
Syntax
the selEnd
Description
Global property; specifies the last character of a selection. It is used with selStart to identify a
selection in the current editable field, counting from the beginning character.
This property can be tested and set. The default value is 0.
Examples
These statements select “cde” from the field “abcdefg”:
the selStart = 3
the selEnd = 5
This statement calls the handler noSelection when selEnd is the same as selStart:
if the selEnd = the selStart then noSelection
This statement makes a selection 20 characters long:
the selEnd = the selStart + 20
See also
editable, hilite (command), selection() (function), selStart, text