Loader parameters

You can set the following authoring parameters for each Loader component instance in the Property inspector or in the Component inspector (Window > Component Inspector menu option):

autoload indicates whether the content should load automatically (true), or wait to load until the Loader.load() method is called (false). The default value is true.

contentPath an absolute or relative URL indicating the file to load into the loader. A relative path must be relative to the SWF file loading the content. The URL must be in the same subdomain as the URL where the Flash content currently resides. For use in Flash Player or in test mode, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive specifications. The default value is undefined until the load starts.

The Loader can load content from other domains, if you have policy files in those domains. See Allowing cross-domain data loading in Learning ActionScript 2.0 in Adobe Flash.

scaleContent indicates whether the content scales to fit the loader (true), or the loader scales to fit the content (false). The default value is true.

You can set the following additional parameters for each Loader component instance in the Component inspector (Window > Component Inspector):

enabled is a Boolean value that indicates whether the component can receive focus and input. The default value is true.

visible is a Boolean value that indicates whether the object is visible (true) or not (false). The default value is true.

NOTE

The minHeight and minWidth properties are used by internal sizing routines. They are defined in UIObject and are overridden by different components as needed. These properties can be used if you make a custom layout manager for your application. Otherwise, setting these properties in the Component inspector has no visible effect.

You can write ActionScript to set additional options for Loader instances using its methods, properties, and events. For more information, see Loader class.