User Guide

633
on stepFrame
Syntax
on stepFrame
statement(s)
end
Description
System message and event handler; works in script instances in actorList because these are the
only objects that receive on stepFrame messages. This event handler is executed when the playhead
enters a frame or the Stage is updated.
An
on stepFrame handler is a useful location for Lingo that you want to run frequently for a
specific set of objects. Assign the objects to
actorList when you want Lingo in the on stepFrame
handler to run; remove the objects from
actorList to prevent Lingo from running. While the
objects are in actorList, the objectson stepFrame handlers run each time the playhead enters a
frame or the
updateStage command is issued.
The stepFrame message is sent before the prepareFrame message.
Assign objects to
actorList so they respond to stepFrame messages. Objects must have an on
stepFrame
handler to use this built-in functionality with actorList.
The
go, play, and updateStage commands are disabled in an on stepFrame handler.
Example
If the child object is assigned to actorList, the on stepFrame handler in this parent script
updates the position of the sprite that is stored in the
mySprite property each time the playhead
enters a frame:
property mySprite
on new me, theSprite
mySprite = theSprite
return me
end
on stepFrame me
sprite(mySprite).loc = point(random(640),random(480))
end
stillDown
Syntax
the stillDown
Description
System property; indicates whether the user is pressing the mouse button (TRUE) or not (FALSE).
This function is useful within a
mouseDown script to trigger certain events only after the
mouseUp function.
Lingo cannot test
stillDown when it is used inside a repeat loop. Use the mouseDown function inside
repeat loops instead.