User Guide
315
insertFrame
Syntax
insertFrame
Description
Command; duplicates the current frame and its content. The duplicate frame is inserted after the
current frame and then becomes the current frame.
This command can be used only during a Score recording session and performs the same function
as the
duplicateFrame command.
Example
The following handler generates a frame that has the transition cast member Fog assigned in the
transition channel followed by a set of empty frames. The argument numberOfFrames sets the
number of frames.
on animBall numberOfFrames
beginRecording
the frameTransition = member ("Fog").number
go the frame + 1
repeat with i = 0 to numberOfFrames
insertFrame
end repeat
endRecording
end
insertOverlay
Syntax
sprite(whichSprite).camera{(index)}.insertOverlay(index, \
texture, locWithinSprite, rotation)
member(whichCastmember).camera(whichCamera).\
insertOverlay(index, texture, \
locWithinSprite, rotation)
Description
3D camera command; adds an overlay to the camera’s list of overlays at the position indicated by
the
index parameter. The overlay is displayed in the 3D sprite at locWithinSprite with the
indicated
rotation. The locWithinSprite parameter is a 2D loc measured from the upper left
corner of the sprite.
Example
The first line of this example creates a texture named Cedar. The second line inserts that texture
at the first position in the list of overlays of the camera of sprite 5. The overlay is positioned at the
point (300, 120), measured from the upper left corner of the sprite. It is rotated 45°.
t1 = member("scene").texture("Cedar")
sprite(5).camera.insertOverlay(1, t1, point(300, 120), 45)
See also
removeOverlay, overlay, bevelDepth