Question : How to delay creationComplete

I use this code.. but it does not function....

Help me please!!!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
	initialize="init()"
	creationComplete="completed()">


private function init():void 
{
   setTimeout(timerCompleted, 10000);                                
}
            
private function timerCompleted():void
{
  dispatchEvent(new Event(Event.COMPLETE));
}
			
private function completed():void
{
   Alert.show("completed !!!!!!!!!!!!!!!!!!!");
}

Answer : How to delay creationComplete

1º  Event.COMPLETE!= FlexEvent.CREATION_COMPLETE
2º you are already setting the function do dispatch in the creationComplete  in the <mx:Application>
3º Sorry, but, does not make any sense to delay the creationComplete, because only when all the components are created in the screen that you can interact with then...
anyway... You can try this (Remember that you wont delay the creationComplete ;) ):
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
	initialize="init()" >

<mx:Script>
	<![CDATA[
		import mx.events.FlexEvent;
		import mx.controls.Alert;
		import mx.rpc.AsyncDispatcher;
		
		private function init():void 
		{
		   setTimeout(timerCompleted, 1000);     
		   addEventListener(Event.COMPLETE,completed,false,0,true);   
		                           
		}
		            
		private function timerCompleted():void
		{
		  dispatchEvent(new Event(Event.COMPLETE));
		}
					
		private function completed(ev:Event):void
		{
		   Alert.show("completed !!!!!!!!!!!!!!!!!!!");
		}
	]]>
</mx:Script>
</mx:Application>
Random Solutions  
 
programming4us programming4us