FileLoaderProcess is a mediator to handle loading of files as
a Process.
If you need to handle a FileLoader with a Process context
you can use FileLoaderProcess as mediator between both APIs.
In contrast to FileLoader you have to call it like:
import org.as2lib.io.file.TextFileLoader;
import org.as2lib.io.file.FileLoaderProcess;
var fileLoader:TextFileLoader = new TextFileLoader();
var loader:FileLoaderProcess = new FileLoaderProcess(fileLoader);
loader.setUri("test.txt");
loader.start();
public function FileLoaderProcess(resourceLoader:FileLoader)
Constructs a new FileLoaderProcess.
resourceLoader | FileLoader to be mediated
|
public function setUri(uri:String, method:String, parameter:Map, callBack:Executable):VoidPrepares the instance for loading events.
All passed-in parameters will be used to .load the certain
resource.
uri | location of the resource to load |
method | (optional) POST/GET as method for submitting the parameters,
default method used if method was not passed-in is POST.
|
callBack | (optional) Executable to be executed after the the resource was loaded. |
public function getFileLoader(Void):FileLoader
Returns the FileLoader that was mediated.
FileLoader that was mediated.
public function getPercentage(Void):Number
Forwards getPercentage to the mediated FileLoader.getPercentage.
percentage of the resource
getPercentage() in org.as2lib.app.exec.Process
public function onLoadStart(resourceLoader:FileLoader):Void
Handles the FileLoaders start event.
resourceLoader | FileLoader that sent the event
|
public function onLoadComplete(resourceLoader:FileLoader):Void
Handles the FileLoaders complete event.
resourceLoader | FileLoader that sent the event
|
public function onLoadProgress(resourceLoader:FileLoader):Void
Handles the FileLoaders progress event.
resourceLoader | FileLoader that sent the event
|
public function onLoadError(resourceLoader:FileLoader, errorCode:String, error):Boolean
Handles the FileLoaders error event.
resourceLoader | FileLoader that sent the event
|