mApplication.loadIcon()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector 2.0;

Macintosh: Not Yet Available

Usage

mApplication.loadIcon(width:Number, height:Number, bits:Number, fileName:String, target:Object) : Void

Parameters

width - Icon width. Usually 16, 24 ,32, or 48 pixels.

height - Icon height. Usually 16, 24 ,32, or 48 pixels.

bits - Either 4, 8, 24, or 32 bits. Specify 4 or 8 to load a 16-colors or a 256-colors icon. Specify 24 to load a true color icon. Specify 32 to load a true color icon with 8-bit transparency (Windows XP icon).

fileName - Name of the local .ico file containing the icon.

target - A path to a target movie clip. The target movie clip will be replaced by the loaded icon.

Returns

Nothing.

Description

Method; Loads an icon from an icon file into a movie clip. An icon file can contain several icons with different dimensions and color depths. Use the mSystem.getIconFormats() function to find out which icons are contained within an .icon file.

Example

The following example loads a 32x32 pixels 32-bit (true color with transparency) icon.

mApplication.loadIcon(32,32,32,"C:/myicon.ico",_root.capture);

See Also

mSystem.loadBitmap()