Using Director > Movies in a Window > Opening and closing a MIAW |  |

Opening and closing a MIAW

Use the commands in this section to open and close movies in windows. Opening a MIAW

To open a MIAW, use the `open window` command. See `open window`.

Unless Lingo explicitly preloads the movie, Director doesn't load the movie into memory until the window is first opened, which can cause a noticeable pause. To load the first frame of the movie, use `preLoadMovie`.

You can specify other window characteristics before or after you open the window.

Closing a MIAW

You can close the window for a MIAW but leave the movie in memory, or you can close the MIAW and remove the movie from memory when it's no longer in use.

| If you leave a MIAW in memory, you'll get better performance if the window is reopened; however, the movie still takes up space in memory. You may want to use this option if you expect a MIAW to be reopened after it initially runs, or if other windows or global variables refer to the MIAW.
| If you remove a MIAW from memory, performance will slow down if the window is reopened, because the movie has to reload; however, memory is freed up until the movie is reloaded. You may want to use this option if you don't expect a MIAW to be reopened after it initially runs, or if you want to optimize memory on the computer running the MIAW.

To close a MIAW but keep it in memory:

Use the `close window` command. After the window is closed, the window becomes invisible, but the movie continues playing. See `close window`.

To close a MIAW and remove it from memory:

Use the `forget window` command. The window is closed and the movie is removed from memory. Use this command only if no other window or global variables still refer to the MIAW. See `forget window`.