Lingo Dictionary > D-F > foreColor

 

foreColor

Syntax

member(castName).foreColor = colorNumber 
set the foreColor of member castName to colorNumber
sprite whichSprite.foreColor
the foreColor of sprite whichSprite

Description

Cast member property; sets the foreground color of a field cast member.

For a movie that plays back as an applet, specify colors for the foreColor sprite property as the decimal equivalent of the 24-bit hexadecimal values used in an HTML document.

It is not recommended to apply this property to bitmap cast members deeper than 1-bit, as the results are difficult to predict.

To see an example of foreColor used in a completed movie, see the Text movie in the Learning\Lingo Examples folder inside the Director application folder.

Example

The hexadecimal value for pure red, FF0000, is equivalent to 16711680 in decimal numbers. This statement specifies pure red as a cast member's forecolor:

member(20).foreColor = 16711680

Example

This statement changes the color of the field in cast member 1 to the color in palette entry 250:

member(1).foreColor = 250

Example

The following statement sets the variable oldColor to the foreground color of sprite 5:

oldColor = sprite(5).foreColor

Example

The following statement makes 36 the number for the foreground color of a random sprite from sprites 11 to 13.

sprite(10 + random(3)).foreColor = 36

Example

The following statement sets the foreColor of word 3 of line 2 of text member myDescription to a value of 27:

member("myDescription").line[2].word[3].forecolor = 27

See also

backColor, color (sprite property)