simpleas3 documentation

Load Images and SWFs at Runtime with loadChild()

In standard ActionScript 3.0, loading images or SWFs involves creating a new loader, adding it to the display list, creating a new URLRequest object, and listening for some events. In AS2, it was easy to call loadMovie().

With SimpleAS3, a new function named loadChild() has been added to every display object that can hold children. It automatically creates the Loader object, sets up listeners, and begins the downloading the asset you want to load.

Method Signature

public function loadChild( url:String, name:String = null, onCompleteMethod:Function = null,
	onProgressMethod:Function = null, onIoErrorMethod:Function = null ):Loader

Parameters