I've done something like this before where I leave the default preloader UI up until additional loading has been completed. If you decide to go down that road, the steps I used were something like this:
- Subclass DownloadProgressBar and override the setter for the preloader property. - In the override, add a listener for FlexEvent.INIT_COMPLETE to the value that was passed in. The listener should have higher-than- default priority. - Also in the override, store a reference to the SystemManager. The SystemManager is the parent of whatever gets passed in. - In the event handler for INIT_COMPLETE, call event.stopImmediatePropogation() to stop the parent class from dispatching the event that closes the preloader UI. - Still in the event handler, use the SystemManager reference that was stored earlier to access your Application class. From here you can check flags or add event listeners to your application or whatever other method you need to determine whether the additional loading is done. - Once it's done, dispatch a Event.COMPLETE event. It's a little messy, but seems to get the job done. --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Well, if you supply your own preloader UI, you can put it back up and > nobody will know. > > > > It is probably possible to delay the taking down of the preloader UI, > but that's going to be harder. It will involve blocking events and > dispatching them later. > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of b_alen > Sent: Tuesday, June 10, 2008 3:11 AM > To: [email protected] > Subject: [flexcoders] Re: Possible to add some data to load to the > default preloader? > > > > Sure, that's the only way to do it now. But then you end up with two > preloaders and handling multiple loaders. If you had that all in the > initial preloader it would be much more seamless. So I wasn't really > asking how to load data in the beginning, but rather I wanted to know > if my option is something doable now or at least something that could > be put on a wish list. > > Cheers > > --- In [email protected] <mailto:flexcoders% 40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > Why does it need to be done at preloader time? You could simply make > > the first screen/state of your app a UI that waits for the ASPX data. > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders% 40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders% 40yahoogroups.com> > ] On > > Behalf Of b_alen > > Sent: Monday, June 09, 2008 12:22 AM > > To: [email protected] <mailto:flexcoders% 40yahoogroups.com> > > Subject: [flexcoders] Re: Possible to add some data to load to the > > default preloader? > > > > > > > > Can't do that, data is coming from aspx. In fact the only way this > > could work is to add info* to swf which data has to be loaded with the > > swf itself. Then the Flash Player would read that, calculate the size > > of data and add it to the preloader of the main swf. Once the whole > > bunsh is downloaded, data would be there in the native format on the > > "root" of the app. Am I dreaming? > > > > * How to add this info is the question. It can't be through AS that's > > for sure, because AS is not running until the app is loaded. Write in > > the header of the swf? Write in the HTML embed directives? > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > , "Alex Harui" <aharui@> wrote: > > > > > > Put the data in an RSL? > > > > > > > > > > > > ________________________________ > > > > > > From: [email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > [mailto:[email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > ] On > > > Behalf Of b_alen > > > Sent: Thursday, June 05, 2008 3:23 AM > > > To: [email protected] <mailto:flexcoders% 40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > > Subject: [flexcoders] Possible to add some data to load to the > default > > > preloader? > > > > > > > > > > > > I always have some stuff to load before the app can be used. Is it > > > possible to stick that loading into the default preloader? So the > swf > > > would know that it has to load other files also before it dispatches > > > the event that it's fully loaded. Maybe some compiler directives, I > > > don't know. > > > > > > Thanks > > > > > >

