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>


Reply via email to