Hi João,

the mx.core.Application class has a static getter 'application', so
once your application is initialized you can simply reference your
application using Application.application from within tour preloader
class.

like this:

addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);

private function initCompleteHandler(event:Event):void {
    Application.application.doSomething();
    //or
    Application.application.addEventListener(Event.SOME_EVENT,
someHandler);
} 

hope this helps,
Max

--- In [email protected], João <[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> I have created a custom application preloader as described here:
>
http://www.onflex.org/ted/2006/07/flex-2-preloaders-swf-png-gif-examples.php
> 
> I need my preloader to communicate with the application, by
> dispatching an event or calling a method on the appliaction where it
> resides, but I'm not being able to make them communicate. 
> 
> Any suggestions?
> 
> Thanks,
> 
> João Saleiro
>


Reply via email to