User Guide
242 Chapter 12: Methods
// JavaScript syntax
function mouseUp() {
_sound.beep(1);
}
See also
Sound
beginRecording()
Usage
-- Lingo syntax
_movie.beginRecording()
// JavaScript syntax
_movie.beginRecording();
Description
Movie method; starts a Score generation session.
When you call
beginRecording(), the playhead automatically advances one frame and begins
recording in that frame. To avoid this behavior and begin recording in the frame in which
beginRecording() is called, place a statement such as _movie.go(_movie.frame - 1) between
the calls to
beginRecording() and endRecording().
Only one update session in a movie can be active at a time.
Every call to
beginRecording() must be matched by a call to endRecording(), which ends the
Score generation session.
Parameters
None.
Example
When used in the following handler, the beginRecording keyword begins a Score generation
session that animates the cast member Ball by assigning the cast member to sprite channel 20 and
then moving the sprite horizontally and vertically over a series of frames. The number of frames is
determined by the argument
numberOfFrames.
-- Lingo syntax
on animBall(numberOfFrames)
_movie.beginRecording()
horizontal = 0
vertical = 100
repeat with i = 1 to numberOfFrames
_movie.go(i)
sprite(20).member = member("Ball")
sprite(20).locH = horizontal
sprite(20).locV = vertical
sprite(20).foreColor = 255
horizontal = horizontal + 3
vertical = vertical + 2
_movie.updateFrame()
end repeat
_movie.endRecording()
end animBall