3D Lingo Dictionary > E-K > insertBackdrop

 

insertBackdrop

Syntax

sprite(whichSprite).camera{(index)}.insertBackdrop(index, texture, locWithinSprite, rotation)
member(whichCastmember).camera(whichCamera).insertBackdrop(index, texture, locWithinSprite, rotation)

Description

3D camera command; adds a backdrop to the camera's list of backdrops at the position indicated by the index parameter. The backdrop 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 called Cedar. The second line inserts that texture at the first position in the list of backdrops of the camera of sprite 5. The backdrop 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.insertBackdrop(1, t1, point(300, 120), 45)

See also

removeBackdrop, backdrop, overlay