| Package | km.display |
| Class | public class AltLoader |
| Inheritance | AltLoader flash.display.Sprite |
import km.display.*;
var l:AltLoader = new AltLoader();
l.setDesiredSize(300);
l.load(new URLRequest('myTextFile.txt'));
addChild(l);
| Property | Defined by | ||
|---|---|---|---|
| content : DisplayObject [read-only] Returns a reference to the content loaded with load() or loadBytes() .
| AltLoader | ||
| contentLoaderInfo : AltLoaderInfo [read-only] The contentLoaderInfo object contains information about load progress and content dimensions.
Supported properties are 'width', 'height', 'bytesLoaded' and 'bytesTotal' . The contentLoaderInfo object also broadcasts 'complete', 'httpStatus', 'ioError', 'open', 'progress' and 'securityError' events to monitor a load() . | AltLoader | ||
| defaultTextFormat : TextFormat The default text format for text content.
| AltLoader | ||
| Method | Defined by | ||
|---|---|---|---|
| AltLoader | |||
|
close():void
Cancels a load() method currently in progress.
| AltLoader | ||
|
load(request:URLRequest, contentType:String = "text", bgColor:uint = 0xffffff):void
Loads content.
| AltLoader | ||
|
loadBytes(bytes:ByteArray, contentType:String = "text", bgColor:uint = 0xffffff):void
Loads content from a ByteArray instead of from a file.
| AltLoader | ||
|
setDesiredSize(width:int, height:int = 0):void
Sets the desired AltLoader size for the content to be loaded.
| AltLoader | ||
|
unload():void
Removes content previously loaded with load() or loadBytes() .
| AltLoader | ||
| content | property |
content:DisplayObject [read-only]Returns a reference to the content loaded with load() or loadBytes() .
Implementation public function get content():DisplayObject
| contentLoaderInfo | property |
contentLoaderInfo:AltLoaderInfo [read-only] The contentLoaderInfo object contains information about load progress and content dimensions.
Supported properties are 'width', 'height', 'bytesLoaded' and 'bytesTotal' .
The contentLoaderInfo object also broadcasts 'complete', 'httpStatus', 'ioError', 'open', 'progress' and 'securityError' events to monitor a load() .
public function get contentLoaderInfo():AltLoaderInfo
| defaultTextFormat | property |
public var defaultTextFormat:TextFormatThe default text format for text content.
| AltLoader | () | constructor |
public function AltLoader()
| close | () | method |
public function close():voidCancels a load() method currently in progress.
| load | () | method |
public function load(request:URLRequest, contentType:String = "text", bgColor:uint = 0xffffff):voidLoads content.
Parametersrequest:URLRequest |
|
contentType:String (default = "text") |
|
bgColor:uint (default = 0xffffff) |
| loadBytes | () | method |
public function loadBytes(bytes:ByteArray, contentType:String = "text", bgColor:uint = 0xffffff):voidLoads content from a ByteArray instead of from a file.
Parametersbytes:ByteArray |
|
contentType:String (default = "text") |
|
bgColor:uint (default = 0xffffff) |
| setDesiredSize | () | method |
public function setDesiredSize(width:int, height:int = 0):voidSets the desired AltLoader size for the content to be loaded.
Parameterswidth:int |
|
height:int (default = 0) |
| unload | () | method |
public function unload():voidRemoves content previously loaded with load() or loadBytes() .