Lingo Dictionary > T-Z > top

 

top

Syntax

sprite(whichSprite).top
the top of sprite whichSprite

Description

Sprite property; returns the top vertical coordinate of the bounding rectangle of the sprite specified by whichSprite as the number of pixels from the upper left corner of the Stage.

When the movie plays back as an applet, this property's value is relative to the upper left corner of the applet.

This property can be tested and set.

Example

This statement checks whether the top of sprite 3 is above the top of the Stage and calls the handler offTopEdge if it is:

if sprite(3).top < 0 then offTopEdge

See also

bottom, height, locH, left, locV, right, width