Looks like maybe you forgot creationComplete="initApp()" on your mx:Application tag.
hth Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com markflex2007 wrote: > I get empty string with the following code.why? > Thanks > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > <mx:Script> > <![CDATA[ > > public var data1:Date; > > [Bindable] > public var theYear:String; > > private function initApp():void{ > > data1 = new Date(); > theYear = data1.getFullYear().toString(); > > } > ]]> > </mx:Script> > > <mx:Label x="97" y="85" text="{theYear}"/> > > </mx:Application> > > > >

