Flash function loading problem

Hi all,

Im working on my own flash website and I’m a kind of newbie and at the moment I have a very weird problem. There are completely no errors involved but it isn’t working. well here is my code.


public function homescreenbuttons(){
            hsbuttonloader.addEventListener(Event.COMPLETE, buttonloadComplete);
            hsbuttonloader.load(new URLRequest("lockbutton.xml"));


            function buttonloadComplete(e:Event):void {
                xmlData=new XML(e.target.data);
                xmlList=xmlData.IMAGE;
                loadlockImage();
            }//end of function buttonloadComplete(e:Event):void {
            
            function loadlockImage():void {
                    //trace("mp3 button nummer = " + i);
                    lockbutton = new Loader();
                    lockbutton.load(new URLRequest(xmlData.IMAGE.@LOCK));
                    trace("URL mp3 button = " + xmlData.IMAGE.@LOCK);
                    lockbutton.x = 1100;
                    lockbutton.y = 850;
                    bg.addChild(lockbutton)
                    lockbutton.addEventListener(MouseEvent.CLICK, unlock);
                    
            }//end of function loadlockImage():void {
            
            function unlock(event:Event):void{
                trace ("Tween Homescreen");
                TweenLite.to(time, 3, {x:0, y:-700});
                TweenLite.to(datefinal, 3, {x:0, y:-600});
                TweenLite.to(homescreentext, 3, {x:0, y:-700});
                
                time.addEventListener(Event.COMPLETE, tweenfinished);
                
                function tweenfinished(event:Event):void{
                    trace ("tweenfinished");
                    dragbg();
                    Textfields();
                }//end of function tweenfinished(event:Event):void{
                
            }//end of function unlock(event:Event):void{
                        
        }//end of public function homescreenbuttons(){

Well the problem is, i tween some objects but when the object time is finished tweening it should start the function tweenfinished. But i don’t get the message tweenfinished in the output.

Does anyone knows where the problem is?

Thanks in advance,

Wouter