User Guide
202 Chapter 10: Events and Messages
An on zoomWindow event handler is a good place to put Lingo that rearranges sprites when
window dimensions change.
Example
This handler moves sprite 3 to the coordinates stored in the variable centerPlace when the
window that the movie is playing in is resized:
-- Lingo syntax
on zoomWindow
centerPlace = point(10, 10)
sprite(3).loc = centerPlace
end
// JavaScript syntax
function zoomWindow() {
var centerPlace = point(10, 10);
sprite(3).loc = centerPlace;
}
See also
drawRect, sourceRect, on resizeWindow