User Guide

Formatting chunks of text with Lingo or JavaScript syntax 177
Formatting text with Lingo or JavaScript syntax
Lingo or JavaScript syntax can format text in an entire cast member or any specific chunk of text.
Use the following properties:
To select or identify a chunk of text in a field cast member, use the selStart and selEnd cast
member properties. These properties identify the first and last characters of a text selection.
To refer to a selected chunk of text, use the selection cast member property.
To specify the font for a text cast member, field cast member, or chunk expression, set the font
cast member property.
To specify the character size for a text cast member, field cast member, or chunk expression, set
the
fontSize property.
To specify the line spacing for a field cast member, set the lineHeight property.
To specify the style for a text cast member, field cast member, or chunk expression, set the
fontStyle property.
To specify the drop shadow size for the characters in a field cast member, set the
boxDropShadow property.
To specify additional spacing to be applied to a chunk expression in a text cast member, set the
charSpacing property.
To specify the foreground color for a field cast member, set the foreColor property.
For more information about these properties, see the Scripting Reference topics in the Director
Help Panel.
Applying paragraph formats with Lingo or JavaScript syntax
Lingo or JavaScript syntax can control paragraph formatting such as alignment and indenting for
a chunk expression:
To set text alignment for a text or field cast member, set the alignment property.
To set line spacing in points for a text cast member, set the fixedLineSpace property.
To add pixels below paragraphs in a text cast member, set the bottomSpacing property.
To add pixels above paragraphs in a text cast member, set the topSpacing property.
To specify line spacing in a field cast member, set the lineHeight property.
To add pixels to the first indent in a chunk expression in a text cast member, set the
firstIndent property.
To set the left indent (in pixels) of a chunk expression in a text cast member, set the
leftIndent property.
To set the right indent (in pixels) of a chunk expression in a text cast member, set the
rightIndent property.
To specify or obtain a list of tabs that are in a chunk expression in a text cast member, set or test
the tabs property.
For more information about these properties, see the Scripting Reference topics in the Director
Help Panel.