There's nothing wrong with using that event, it is what is in your preloader that matters. Not sure what you're doing in your preloader, but I can't imagine how you can get radiobuttons to show up as buttons.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of maximecowez Sent: Monday, April 14, 2008 9:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Custom preloader bug Well I supposed the FlexEvent.INIT_COMPLETE event got dispatched when the framework had finished loading. Is there another event I have to listen for then? Plus the bug only seems to apply to children of the Button class. --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > The preloader runs while the framework is loading, so you can't have any > framework dependencies > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of maximecowez > Sent: Monday, April 14, 2008 3:29 AM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Custom preloader bug > > > > I wonder if this is a Flex bug or if I'm doing something wrong: I'm > using a custom preloader to first fetch all the data and only then > display the application. > > It does exactly what it's supposed to do, BUT when I open a TitleWindow > that has it's 'showCloseButton' attribute set to 'true', the close > button doesn't show. Furthermore, all radio buttons in the window are > displayed as regular buttons. If I load the data on 'CreationComplete' > without the custom preloader everything is fine. > > At first I used the method described in Ted Patrick's tutorial > <http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php <http://www.onflex.org/ted/2006/07/flex-2-custom-preloaders.php> > . Then > I wrote my own version implementing IPreloaderDisplay instead of > extending DownloadProgressBar. Although the latter is more efficient, > keep getting that same bug. > > Here's what I do on FlexEvent.INIT_COMPLETE (VMain is the view, Main is > the model, CMain is the controller: > > var view:VMain = Application.application as VMain; > var data:Main = new Main(view.parameters); > > data.addEventListener(Event.COMPLETE, > function(event:Event):void { > dispatchEvent(new Event(Event.COMPLETE)); > }); > > new CMain(view, data); > > Any ideas? To me it looks like part of the Flex framework isn't loaded > yet. Am I dispatching the event to early? > Thanks >