User Guide

561
When the rotation limit is reached (slightly past the 59,652th rotation), the rotation resets to
+116.47° or -116.48°—not 0.00°. This is because +21,474,836.47° is equal to +116.47°, and -
21,474,836.48° is equal to -116.48° (or +243.12°). To avoid this reset condition, when you use
Lingo to perform continuous rotation, constrain the angles to ±360°.
This property can be tested and set. The default value is 0.
Examples
This behavior causes a sprite to rotate continuously by 2° every time the playhead advances,
limiting the angle to 360°:
property spriteNum
on prepareFrame me
sprite(spriteNum).rotation = integer(sprite(spriteNum).rotation + 2) mod 360
end
The following frame script keeps the playhead looping in the current frame while it rotates a
QuickTime sprite in channel 5 a full 360° in 16° increments. When the sprite has been rotated
360°, the playhead continues to the next frame.
on exitFrame
if sprite(5).rotation < 360 then
sprite(5).rotation = sprite(5).rotation + 16
go the frame
end if
end
This handler accepts a sprite reference as a parameter and rotates a Flash movie sprite 360° in 10°
increments:
on rotateMovie whichSprite
repeat with i = 1 to 36
sprite(whichSprite).rotation = i * 10
updatestage
end repeat
end
See also
flipH, flipV, obeyScoreRotation, originMode
rotation (backdrop and overlay)
Syntax
sprite(whichSprite).camera.backdrop[backdropIndex].rotation
member(whichCastmember).camera(whichCamera).backdrop
[backdropIndex].rotation
sprite(whichSprite).camera.overlay[overlayIndex].rotation
member(whichCastmember).camera[cameraIndex].overlay
[overlayIndex].rotation
Description
3D property; allows you to get or set the rotation of the backdrop or overlay toward the default
camera. The default value of this property is 0.0.
Example
This statement rotates a backdrop 60° around its registration point:
sprite(4).camera.backdrop[1].rotation = 60.0
See also
bevelDepth, transform (property)