User Guide

736 Chapter 14: Properties
directToStage
Usage
-- Lingo syntax
memberOrSpriteObjRef.directToStage
// JavaScript syntax
memberOrSpriteObjRef.directToStage;
Description
Cast member and sprite property; determines the layer where a digital video, animated GIF,
vector shape, 3D, Windows Media, or Flash Asset cast member plays.
If this property is
TRUE (1), the cast member plays in front of all other layers on the Stage, and
ink effects have no affect.
If this property is
FALSE (0), the cast member can appear in any layer of the Stages animation
planes, and ink effects affect the appearance of the sprite.
Use the syntax member(whichCastMember).directToStage for digital video or
animated GIFs.
Use the syntax sprite(whichSprite).directToStage for Flash or vector shapes.
Use either syntax for 3D cast members or sprites.
Using this property improves the playback performance of the cast member or sprite.
No other cast member can appear in front of a
directToStage sprite. Also, ink effects do not
affect the appearance of a
directToStage sprite.
When a sprites
directToStage property is TRUE, Director draws the sprite directly to the screen
without first compositing it in the Director offscreen buffer. The result can be similar to the trails
ink effect of the Stage.
Explicitly refresh a trailed area by turning the
directToStage property off and on, using a full-
screen transition, or “wiping” another sprite across this area. (In Windows, if you dont do this,
you can branch to another similar screen, and the video may not completely disappear.)
To see an example of
directToStage used in a completed movie, see the QT and Flash movie in
the Learning/Lingo Examples folder inside the Director application folder.
Example
This statement makes the QuickTime movie The Residents always play in the top layer of
the Stage:
-- Lingo syntax
member("The Residents").directToStage = 1
// JavaScript syntax
member("The Residents").directToStage = 1;