User Guide
782 Chapter 14: Properties
Description
Cast member property; determines the styles applied to the font used to display the specified field
cast member, character, line, word, or other chunk expression and requires that the field cast
member contain characters, if only a space.
The value of the property is a string of styles delimited by commas. Lingo uses a font that is a
combination of the styles in the string. The available styles are plain, bold, italic, underline,
shadow, outline, and extended; on the Macintosh, condensed also is available.
Use the style plain to remove all currently applied styles. The parameter
whichCastMember can be
either a cast member name or number.
This property can be tested and set.
To see an example of
fontStyle used in a completed movie, see the Text movie in the Learning/
Lingo Examples folder inside the Director application folder.
Example
This statement sets the variable named oldStyle to the current fontStyle setting for the field
cast member Rokujo Speaks:
--Lingo syntax
oldStyle = member("Rokujo Speaks").fontStyle
// JavaScript syntax
var oldStyle = member("Rokujo Speaks").fontStyle;
This statement sets the fontStyle member property for the field cast member Poem to
bold italic:
--Lingo syntax
member("Poem").fontStyle = "bold, italic"
// JavaScript syntax
member("Poem").fontStyle = "bold, italic";
This statement sets the fontStyle property of the third word of the cast member Son’s Names
to italic:
--Lingo syntax
member("Son's Names").word[3].fontStyle = "italic"
// JavaScript syntax
member("Son's Names").getPropRef("word", 3).fontStyle = "italic";
This statement sets the fontStyle member property of word 1 through word 4 of text member
myNote to bold italic:
--Lingo syntax
member("myNote").word[1..4].fontstyle = "bold, italic"
// JavaScript syntax
for (var i = 1; i <= 4; i++) {
member("myNote").getPropRef("word", i).fontStyle = "bold, italic";
}
See also
text, alignment, fontSize, font, lineHeight