Lingo Dictionary > O-R > on resizeWindow |  |

on resizeWindow

Syntax

    on resizeWindow
    	statement(s)
    end

Description

System message and event handler; contains statements that run when a movie is running as a movie in a window (MIAW) and the user resizes the window by dragging the window's resize box or one of its edges.

An `on resizeWindow` event handler is a good place to put Lingo related to the window's dimensions, such as Lingo that positions sprites or crops digital video.

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:

    on resizeWindow centerPlace
    	sprite(3).loc = centerPlace
    end

See also

`drawRect`, `sourceRect`