updateStage()

Usage

-- Lingo syntax
_movie.updateStage()

// JavaScript syntax
_movie.updateStage();

Description

Movie method; redraws the Stage immediately instead of only between frames.

The updateStage() method redraws sprites, performs transitions, plays sounds, sends a prepareFrame message (affecting movie and behavior scripts), and sends a stepFrame message (which affects actorList).

Parameters

None.

Example

This handler changes the sprite's horizontal and vertical locations and redraws the Stage so that the sprite appears in the new location without having to wait for the playhead to move:

-- Lingo syntax
on moveRight(whichSprite, howFar)
   sprite(whichSprite).locH = sprite(whichSprite).locH + howFar
   _movie.updateStage()
end moveRight

// JavaScript syntax
function moveRight(whichSprite, howFar) {
   sprite(whichSprite).locH = sprite(whichSprite).locH + howFar;
   _movie.updateStage();
}

See also

actorList, Movie, on prepareFrame, on stepFrame


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/director/mx2004/release_update_en/07_me459.htm