Attribute/Method |
Type |
Function |
GetClass (className: string) |
Function |
Obtain the loaded swf based on the class name or its class in the sub-swf loaded by LoaderMax. The class can be instantiated. This method returns a class |
GetSWFChild (name: String) |
Function |
Obtain the top-level sub-Display object of the loaded swf by displaying the object name attribute. For example, swf1 is the swf file to be loaded, on the swf1 stage, there is a video clip called a, so you can use getSWFChild ("a") to get the video clip. This object returns a display object, if an error occurs, null is returned. |
AutoPlay |
Boolean |
The default value is true. When the value is true, the video starts playing as long as the INIT event of SWFLoader is triggered. |
Name |
String |
Used to identify a SWFLoader 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 |
Width |
Number |
Sets the width of ContentDisplay. If no value is set, it indicates the width of the video to be loaded. |
Heigth |
Number |
Sets the height of ContentDisplay. If no value is set, it indicates the height of the video 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 video to be loaded adapts to this region. The following modes are available: "Stretch", default value, the film will be fully adapted to the height and width "ProportionalInside", the film scales proportionally to fit the height and width, and never exceeds this area "ProportionalOutside", the film scales proportionally to fit the height and width, and some of them exceed this area "WidthOnly", only applicable to width "HeightOnly", only applicable to high "None", the film will keep the original size |
HAlign |
String |
After defining the height and width of ContentDisplay, this parameter determines how the video 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 video 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 video 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 video url. If the initial url fails to be loaded, the system will try to load this url. |
NoCache |
Boolean |
If this parameter is set to true, the video 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 video 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 |
|
OnChildOpen |
Function |
When its sub-loader (RequireWithRoot is set as the root SWF ) When loading starts,LoaderEvent Event object parameters |
OnChildProgress |
Function |
...... |
OnChildComplete |
Function |
...... |
OnChildCancel |
Function |
...... |
OnChildFail |
Function |
...... |