User Guide

213
Example
This handler uses the end case keyword to end the case statement:
on keyDown
case the key
of "A": go to frame "Apple"
of "B", "C" :
puppetTransition 99
go to frame "Mango"
otherwise beep
end case
end keyDown
See also
case
endAngle
Syntax
member(whichCastmember).modelResource(whichModelResource).\
endAngle
Description
3D #cylinder or #sphere model resource property; indicates how much of the sphere or
cylinder is drawn.
The surface of a sphere is generated by sweeping a 2D half circle arc around the spheres Y axis
from
startAngle to endAngle. If startAngle is set to 0 and endAngle is set to 360, the result is
a complete sphere. To draw a section of a sphere, set endAngle to a value less than 360.
The surface of a cylinder is generated by sweeping a 2D line around the sphere’s Y axis from
startAngle to endAngle. If startAngle is set to 0 and endAngle is set to 360, the result is a
complete cylinder. To draw a section of a cylinder, set
endAngle to a value less than 360.
The default setting for this property is 360.
Example
For this example, assume that the cast member named MyMember contains a model that uses the
model resource named Sphere4, whose
endAngle value is 310, leaving an opening of 50°. The
handler
closeSphere closes that opening in a way that makes it look like it is sliding shut. The
repeat loop changes the
endAngle value of the sphere 1° at a time. The updateStage command
in the repeat loop forces the Stage to redraw after every 1° increment.
on closeSphere
MyAngle = member("MyMember").modelresource("Sphere4").endAngle
repeat with r = 1 to 50
MyAngle = MyAngle + 1
member("MyMember").modelresource("Sphere4").endAngle = MyAngle
updateStage
end repeat
end
See also
state (3D)