Loadup utility based on the popular PureMVC utility of the same name
ActionScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
loadup-project
loadup-tests
.gitignore
README.textile

README.textile

If it were my code, I would use AssetLoader instead of this library.

Not much in the way of docs yet, but:

At the simplest:

var monitor:ILoadupMonitor = new LoadupMonitor(eventDispatcher);
//*Resource implement IResource, which carries a load() method
//in the context of Robotlegs this would take place in a command 
//and these resources would be injected services
monitor.addResourceArray( [oneResource, twoResource, threeResource, fourResource] );
monitor.startResourceLoading();

A little more complex…

var monitor:ILoadupMonitor = new LoadupMonitor(eventDispatcher);
//adding the resources individually gives you access to the ILoadupResource
//objects. With these you can set loading order requirements and individual
//retry policies.
var oneLoadResource:ILoadupResource = monitor.addResource(myService);
var twoLoadResource:ILoadupResource = monitor.addResource(myOtherService);
var threeLoadResource:ILoadupResource = monitor.addResource(myCoolService);
var fourLoadResource:ILoadupResource = monitor.addResource(myFinalService);

fourLoadResource.required = [threeLoadResource, twoLoadResource];
oneLoadResource.required = [fourLoadResource];

monitor.startResourceLoading();

There is also some RetryPolicy action that I haven’t documented yet. Soon…