This page explains how to load one SWF into another SWF. Doing so allows you to make your Flash movies modular. It is easier to build a Flash movie in separate pieces, as shown here. Copyright © 2003 Mindy McAdams
1) The main SWF in this case is 750 pixels wide x 400 pixels high.

2) To load an external SWF file into the main SWF, you must have an empty movie clip on a layer higher than the other content in the FLA of this file. (The white arrow above is pointing at the empty movie clip, which Flash represents with a crosshair in a white circle.) The position (X, Y) of the empty movie clip determines where the upper left corner of the loaded SWF will be.

The empty movie clip must have an instance name. This one is named "loader_mc."

3) The external SWF file in this case is 355 x 263. The filename is "literary.swf."

4) When a button is clicked in the main SWF, or when some other action occurs (as scripted by the Flash author), the external SWF "literary.swf" will appear in the space indicated above.

The script on a button that causes this external SWF to be loaded would be:

loader_mc.loadMovie("literary.swf");

Note that your filename and your movie clip instance name may differ!

5) After the button click, the external SWF loads in the position determined by the empty movie clip.

Another button can load another external SWF into the exact same place, replacing this one. In other words, you can easily change which external SWF appears here.

To see this example in action, open the Tribute to Marshall McLuhan page and spin the dial. The dial has the script shown at left on each position where it stops spinning -- so it can load 12 different SWFs, depending on which number is dialed.

Scroll horizontally to see all the instructions on this page.