Attribute |
Type |
Function |
Name |
String |
Used to identify the ImageLoader instance.LoaderMax.getLoader() OrLoaderMax.getContent() Can be trace at any time, must be unique, if no display settings, will be automatically created, such as "loader21" |
Container |
DisplayObject Container |
ContentDisplay (a sprite) representing the image content will be added to the container specified by this parameter |
Smoothing |
Boolean |
If this parameter is set to true, the image edge is smoothed out. Otherwise, the image may be scaled out of the image. |
Width |
Number |
Sets the width of ContentDisplay. If no value is set, it indicates the width of the image to be loaded. |
Heigth |
Number |
Sets the height of ContentDisplay. If no value is set, it indicates the height of the image to be loaded. |
CenterRegistration |
Boolean |
If it is true, the registration point of ContentDisplay will be in the center |
ScaleMode |
String |
When the height and width of ContentDisplay are set, this parameter determines how the image to be loaded adapts to this region. The following modes are available: "Stretch", default value, the image will be fully adapted to the height and width "ProportionalInside", the image scales proportionally to fit the height and width, and never exceeds this area. "ProportionalOutside", the image scales proportionally to fit the height and width, and some of it exceeds this area. "WidthOnly", only applicable to width "HeightOnly", only applicable to high "None", the image will keep the original size |
HAlign |
String |
After defining the height and width of ContentDisplay, this parameter determines how the image is aligned horizontally in ContentDisplay. the following values are available: "Center", default value, center alignment "Left", left aligned "Right", right alignment |
VAlign |
String |
After defining the height and width of ContentDisplay, this parameter determines how the image is aligned in the vertical direction of ContentDisplay. the following values are available: "Center", default value, center alignment "Top", alignment on "Bottom", bottom alignment |
Crop |
Boolean |
When the height and width of ContentDisplay are set, content beyond this part of the image will be dropped. |
X |
Number |
Set the x coordinate of ContentDisplay |
Y |
Number |
Set y coordinates of ContentDisplay |
ScaleX |
Number |
Set the scaleX value of ContentDisplay |
ScaleY |
Number |
Set the scaleY value of ContentDisplay |
Rotation |
Number |
Set ContentDisplay Rotation |
Alpha |
Number |
Sets the transparency of ContentDisplay. |
Visible |
Boolean |
Set ContentDisplay visibility |
BlendMode |
String |
Set blendMode of ContentDisplay |
BgColor |
Uint |
The color of the rectangle in ContentDisplay. This rectangle is automatically added and transparent by default. |
BgAlpha |
Number |
Transparency of the rectangle in ContentDisplay |
Context |
LoaderContext |
|
EstimatedBytes |
Uint |
|
AlternateUrl |
String |
Optional image url. If the initial url fails to be loaded, the url will be loaded. |
NoCache |
Boolean |
If true, the image cache is disabled. |
RequireWithRoot |
DisplayObject |
LoaderMax supports subloding, that is, the loading process of an object can be added to the loading process of its parent object to become part of the parent element loading process, if you want this ImageLoader to be part of its parent SWFLoader's loading process, set this value to your root swf |
AutoDispose |
Boolean |
If this parameter is set to true, the ImageLoader object is automatically destroyed after loading. The default value is false. |
|
|
|
OnOpen |
Function |
The function called when loading starts.LoaderEvent Event object parameters |
OnInit |
Function |
The function called when the image starts to be downloaded.LoaderEvent Event object parameters |
OnProgress |
Function |
If a function is called when data changes occur during the loading process,LoaderEvent Event object parameters You can useLoaderEvent . Target. progress, or use it separatelytarget.bytesLoaded Andtarget.bytesTotal |
OnComplete |
Function |
The function called when the load is complete will inputLoaderEvent Event object parameters |
OnCancel |
Function |
When the function is called when the load is canceled or fails,LoaderEvent Event object parameters |
OnError |
Function |
When a function is called when an error occurs during loading,LoaderEvent Event object parameters |
OnFail |
Function |
|
OnIOError |
Function |
|
OnHTTPStatus |
Function |
|
OnSecurityError |
Function |
|
OnScriptAccessDenied |
Function |
|
|
|
|