-
1. Re: help with preloader
socialvisionklk May 5, 2010 5:37 PM (in response to kamckng)Hey,
There's some discussion about this subject on this page: http://npacemo.com/wordpress/2008/07/06/flex-application-bootstrapping-totally-custom-prel oader/
You might run into the same problem I am though, and that's how to start using Flex classes in the preloader. Is there a way to detect when the Flex framework has loaded so that we can safely use these classes? I'm trying to do something similar to OP, where my preloader access a data service before letting the application start, and I want to use classes in the mx.rpc package, but am not sure how.
Thanks,
Karthik
-
2. Re: help with preloader
kamckng May 5, 2010 5:41 PM (in response to socialvisionklk)I did find a "solution" to my particular problem. In my custom Preloader.as class I created a static variable that is set to the instance of the preloader in it's constructor. Then I don't dispatch the Event.COMPLETE event in it's normal place. Instead it loads the swf normally and then my application takes over and I load all assets I need in there, and I use Preloader.instance and pass in how far along I am. So then the preloader instance still exists and once my app is done, I send that it's done to the preloader and THEN I dispatch the Event.COMPLETE.
Kyle
