https://github.com/joelhooks/robotlegs-utilities-loadup
Loadup utility based on the popular PureMVC utility of the same name
https://github.com/joelhooks/robotlegs-utilities-loadup
Last synced: 3 months ago
JSON representation
Loadup utility based on the popular PureMVC utility of the same name
- Host: GitHub
- URL: https://github.com/joelhooks/robotlegs-utilities-loadup
- Owner: joelhooks
- Created: 2009-10-22T08:11:13.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-07-09T14:19:46.000Z (almost 15 years ago)
- Last Synced: 2025-04-04T11:07:46.528Z (3 months ago)
- Language: ActionScript
- Homepage:
- Size: 890 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
Awesome Lists containing this project
README
If it were my code, I would use "AssetLoader":http://github.com/Matan/AssetLoader instead of this library.
Not much in the way of docs yet, but:
h3. 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();h3. 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...