User Guide
242
This property can be tested but not set.
Example
This sprite script resizes a Flash movie sprite so that it is equal to the original size of its Flash
movie cast member:
on beginSprite me
sprite(me.spriteNum).rect = sprite(me.spriteNum).member.FlashRect
end
See also
defaultRect, defaultRectMode, state (Flash, SWA)
flashToStage()
Syntax
sprite(whichFlashSprite).flashToStage(pointInFlashMovie)
flashToStage (sprite whichFlashSprite, pointInFlashMovie)
Description
Function; returns the coordinate on the Director Stage that corresponds to a specified coordinate
in a Flash movie sprite. The function accepts both the Flash channel and movie coordinate and
returns the Director Stage coordinate as Director point values: for example, point(300,300).
Flash movie coordinates are measured in Flash movie pixels, which are determined by a movie’s
original size when it was created in Flash. For the purpose of calculating Flash movie coordinates,
point(0,0) of a Flash movie is always at its upper left corner. (The cast member’s
originPoint
property is used only for rotation and scaling, not to calculate movie coordinates.)
The
flashToStage and the corresponding stageToFlash functions are helpful for determining
which Flash movie coordinate is directly over a Director Stage coordinate. For both Flash and
Director, point(0,0) is the upper left corner of the Flash Stage or Director Stage. These
coordinates may not match on the Director Stage if a Flash sprite is stretched, scaled, or rotated.
Example
This handler accepts a point value and a sprite reference as a parameter, and it then sets the upper left
coordinate of the specified sprite to the specified point within a Flash movie sprite in channel 10:
on snapSprite whichFlashPoint, whichSprite
sprite(whichSprite).loc = sprite(1).FlashToStage(whichFlashPoint)
updatestage
end
See also
stageToFlash()
flat
Syntax
member(whichCastmember).shader(whichShader).flat
member(whichCastmember).model(whichModel).shader.flat
member(whichCastmember).model(whichModel).shaderList{[index]}.flat
Description
3D #standard shader property; indicates whether the mesh should be rendered with flat shading
(
TRUE) or Gouraud shading (FALSE).