views:

360

answers:

1

Hi ,

i have a custom component (AS3 component) which i include in my main.mxml. The problem is that it takes a bout 2 seconds longer than the main page to load. It has a db call which casues the delay.

how can i fix this so that my custom component is loaded and displayed at the same time as my main.mxml file

this is my component include ;

<comp:InputFieldGenerator>

+2  A: 

If you're waiting for some asynchronous operation (e.g. a RemoteObject call) to complete, you could wrap your "main page" in a container, set its initial visibility to false and only flip it when your operation completes. You can also use states in your main.mxml for the same effect.

Simon
cool never thought of taht!
combi001