Friday, March 23, 2007

Do you want prevent flex loader from start up your application?

Here's a really simple trick you can use to prevent the Flex loader from showing when you start up your application. All you have to do is hide the window, and show it when the Application is ready.

In MyApplication-app.xml:

"<"rootContent systemChrome="standard" transparent="false" visible="false">[SWF reference is generated]

"</"rootContent">"

This sets your application manifest to make the root window invisible. Then, you just make it visible when everything's ready:

In MyApplication.mxml:

"<"mx:MyApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="window.visible = true" ">"