215
Example
When used in the following handler, the
endRecording
keyword ends the Score
generation session:
on animBall numberOfFrames
beginRecording
horizontal = 0
vertical = 100
repeat with i = 1 to numberOfFrames
go to frame i
sprite(20).member = member "Ball"
sprite(20).locH = horizontal
sprite(20).locV = vertical
horizontal = hori 3
vertical = ve 2
updateFrame
end repeat
endRecording
end
See also
beginRecording
,
scriptNum
,
tweened
,
updateFrame
end repeat
See
repeat while
,
repeat with
,
repeat with...in list
,
repeat with...down to
on endSprite
Syntax
on endSprite
statement(s)
end
Description
System message and event handler; contains Lingo that runs when the playhead leaves a sprite
and goes to a frame in which the sprite doesn’t exist. It is generated after
exitFrame
.
Place
on endSprite
handlers in a behavior script.
Director destroys instances of any behavior scripts attached to the sprite immediately after the
endSprite
event occurs.
The event handler is passed the behavior or frame script reference
me
if used in a behavior. This
endSprite
message is sent after the
exitFrame
message if the playhead plays to the end of the frame.
The
go
,
play
, and
updateStage
commands are disabled in an
on endSprite
handler.
Example
This handler runs when the playhead exits a sprite:
on endSprite me
-- clean up
gNumberOfSharks = gNumberOfSharks - 1
puppetSound(5,0)
end
See also
on beginSprite
,
on exitFrame
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...