Lingo Dictionary > O-R > on prepareFrame |
![]() ![]() ![]() |
on prepareFrame
Syntax
on prepareFram
estatement(s)
end
Description
System message and event handler; contains statements that run immediately before the current frame is drawn.
Unlike beginSprite
and endSprite
events, a prepareFrame
event is generated each time the playback head enters a frame.
The on prepareFrame
handler is a useful place to change sprite properties before the sprite is drawn.
If used in a behavior, the on prepareFrame
handler receives the reference me
.
The go
, play
, and updateStage
commands are disabled in an on prepareFrame
handler.
Example
This handler sets the locH
property of the sprite that the behavior is attached to:
on prepareFrame me sprite(me.spriteNum).locH = the mouseH end
See also
![]() ![]() ![]() |