switchColorDepth

Usage

-- Lingo syntax
_player.switchColorDepth

// JavaScript syntax
_player.switchColorDepth;

Description

Player property; determines whether Director switches the monitor that the Stage occupies to the color depth of the movie being loaded (TRUE) or leaves the color depth of the monitor unchanged when a movie is loaded (FALSE, default). Read/write.

When switchColorDepth is TRUE, nothing happens until a new movie is loaded.

Setting the monitor's color depth to that of the movie is good practice.

The value of this property can also be set using the Reset Monitor to Movie's Color Depth option in the General Preferences dialog box.

Example

This statement sets the variable named switcher to the current setting of switchColorDepth:

-- Lingo syntax
switcher = _player.switchColorDepth

// JavaScript syntax
var switcher = _player.switchColorDepth;

This statement checks whether the current color depth is 8-bit and turns the switchColorDepth property on if it is:

-- Lingo syntax
if (_system.colorDepth = 8) then
   _player.switchColorDepth = TRUE
end if

// JavaScript syntax
if (_system.colorDepth == 8) {
   _player.switchColorDepth = true;
}

See also

colorDepth, Player