Flash CS4 and Loading External Files

You need to upgrade your Flash player (v.9 or later) to view this tutorial.

Flash makes it easy to load and unload external photos and also other Flash movies (SWF files). In ActionScript 3.0, this is done via the Loader object.

To view the ActionScript that makes it all possible, download the FLA for the movie above.

This FLA loads the first photo (felucca boats on the Nile) automatically, without the use of a button. Then a second photo (a felucca sailor) and the sailboat animation are loaded via two separate buttons. The third button empties the Loader (clears it).

More information about the Loader object is available here: Using the Loader Class in AS3

DOWNLOAD You'll find the FLA and the three loaded files in this folder.

Education use: This package was created as an example for my journalism students. It is not intended to be used commercially.

Use and re-use: Flash CS4 and Loading External Files by Mindy McAdams is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Creative Commons License

Updated 12 April 2010