This content has been marked as final. Show 7 replies
From what I understand, applicationComplete is triggered after the app has been added to the display list, but before properties have been applied. To be safe, I would use creationComplete, which is after properties have been applied.
I ran your sample app (minus the databse connection aspect) and it worked fine with either event triggering the init() method. I suspect the problem is with your database connection.
One thing I would recommend is that instead of having the Alert box display right after the call to connect(), you should have it in an event handler that is triggered by a successful connection.
After all components are created and drawn, the Application object dispatches an applicationComplete event. This is the last event dispatched during an application startup.
See this FB3 help topic:
About startup order
Thank for reply is it correct way if I put two event together because I put two event together and is work well.
I too had to go to applicationComplete (working with AIR) because it appeared to me that at creationComplete, the stage was still null and I was trying to set the stage size (again, AIR), but it worked with ApplicationComplete, implying that the stage must be rendered by that time.
hi, thank for reply.
I have try out putting two event applicationComplete & creationComplete together and is work fine.
May I know is this a correct way by putting two event together?
This is perfectly OK to have two event handlers as long as you do not access objects and properties that do not exist at each phase. You could even have three if you add an handler for the initialize event.
In my applications, I always use applicationComplete and only this one.
thank for your help.... learn something new today