-- Lingo syntaxspriteObjRef.top // JavaScript syntaxspriteObjRef.top;
Sprite property; returns or sets the top vertical coordinate of the bounding rectangle of a sprite as the number of pixels from the upper left corner of the Stage. Read/write.
This statement checks whether the top of sprite 3 is above the top of the Stage and calls the handler offTopEdge if it is:
-- Lingo syntax
if (sprite(3).top < 0) then
offTopEdge()
end if
// JavaScript syntax
if (sprite(3).top < 0) {
offTopEdge();
}
bottom, height, left, locH, locV, right, Sprite, width