UI Control initialization event
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> private function initDate():void { label1.text += new Date(); } </mx:Script> <mx:Box borderStyle="solid"> <mx:Label id="label1" text="Today's Date: " initialize="initDate();" /> </mx:Box> </mx:Application>