569
Examples
The following sprite script keeps the playhead looping in the current frame while the QuickTime
sprite in channel 5 is scaled down in 5% increments. When the sprite is no longer visible (because
its horizontal scale value is 0% or less), the playhead continues to the next frame.
on exitFrame me
scaleFactor = sprite(spriteNum).scale[1]
currentMemberNum = sprite(spriteNum).memberNum
if member(currentMemberNum).crop = FALSE then
member(currentMemberNum).crop = TRUE
end if
if scaleFactor > 0 then
scaleFactor = scaleFactor - 5
sprite(spriteNum).scale = [scaleFactor, scaleFactor]
go the frame
end if
end
This handler accepts a reference to a Flash movie sprite as a parameter, reduces the movie’s
scale to 0% (so it disappears), and then scales it up again in 5% increments until it is full size
(100%) again:
on scaleMovie whichSprite
sprite(whichSprite).scale = 0
updatestage
repeat with i = 1 to 20
sprite(whichSprite).scale = i * 5
updatestage
end repeat
end
See also
scaleMode
,
originMode
scale (backdrop and overlay)
Syntax
member(
whichCastmember
).camera(
whichCamera
).backdrop\
[
backdropIndex
].scale
member(
whichCastmember
).camera(
whichCamera
).overlay\
[
overlayIndex
].scale
Description
3D property; allows you to get or set the scale value used by a specific overlay or backdrop in the
referenced camera’s list of overlays or backdrops to display. The width and height of the backdrop
or overlay are multiplied by the scale value.The default value for this property is 1.0.
Example
This statement doubles the size of a backdrop:
sprite(25).camera.backdrop[1].scale = 2.0
See also
bevelDepth
,
overlay
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...