User Guide

232 Chapter 12: Methods
addBackdrop
Usage
-- Lingo syntax
sprite(whichSprite).camera{(index)}.addBackdrop(texture, locWithinSprite,
rotation)
member(whichCastmember).camera(whichCamera).addBackdrop(texture,
locWithinSprite, rotation)
// JavaScript syntax
sprite(whichSprite).camera{(index)}.addBackdrop(texture, locWithinSprite,
rotation);
member(whichCastmember).camera(whichCamera).addBackdrop(texture,
locWithinSprite, rotation);
Description
3D camera command; adds a backdrop to the end of the cameras list of backdrops.
Parameters
texture
Required. The texture to apply to the backdrop.
locWithinSprite Required. A 2D loc at which the backdrop is displayed in the 3D sprite. This
location is measured from the upper left corner of the sprite.
rotation Required. An integer that specifies the number of degrees to rotate the texture.
Example
The first line of this statement creates a texture named Rough from the cast member named
Cedar and stores it in the variable t1. The second line applies the texture as a backdrop at the
point (220, 220) within sprite 5. The texture has a rotation of 0 degrees. The last line applies the
same texture as a backdrop for camera 1 of the cast member named Scene at the point (20, 20)
with a rotation of 45 degrees.
t1 = member("Scene").newTexture("Rough", #fromCastMember, \
member("Cedar"))
sprite(5).camera.addBackdrop(t1, point(220, 220), 0)
member("Scene").camera[1].addBackdrop(t1, point(20, 20), 45)
See also
removeBackdrop
addCamera
Usage
-- Lingo syntax
sprite(whichSprite).addCamera(whichCamera, index)
-- JavaScript syntax
sprite(whichSprite).addCamera(whichCamera, index);
Description
3D command; adds a camera to the list of cameras for the sprite. The view from each camera is
displayed on top of the view from cameras with lower
index positions. You can set the rect
property of each camera to display multiple views within the sprite.