I'm writing an application that loads modules at start.
These modules are s:Module objects.
I'm using the s:ModuleLoader to load these modules, as i was getting errors trying to load these files with a simple Loader/URLLoader.
Here's how i load them :
var moduleLoader:ModuleLoader = new ModuleLoader();
Where url is the correct URL to a module, nothing wrong here. Basically i have this in a queue, and as soon as a module is loaded, i load the next one on the list.
The problem is that everytime i execute the code, i have a random number of modules loaded.
When a module is not loaded, no ModuleEvent.READY is dispatched, but the module is fully loaded, because when i check the "progress" handler, the last tick shows me 48683/48683 loaded (for instance), so the module is loaded but no event is dispatched that would tell me that loading is complete.
I don't get any errors / warnings.
I really don't understand why it is so random.
Switching modules' places in the queue still makes them load randomly, so no effect.
Tried to exclude modules from the list - still random.
Sometimes modules won't load at all.
During these executions i don't make any changes to my code at all.
Please help me, or tell me how i can load modules otherwise, not using this ModuleLoader.
Using Flex 4.6
ModuleLoader needs to have a parent. Otherwise it may not start the load, and it will get randomly garbage collected.