Problem with displaying the data from Database on swf file

Hi ,

I am new to flash.Thanks in Advance Please help me…

Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next when we click on the button for the second time(or anytime) it is not going and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.

my Code looks like this:




submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);

function onCheck2(evnt:MouseEvent):void {

var xmlLoader:URLLoader = new URLLoader();
var xmlurl:String = "http://localhost:8888/xmlServlet";
var xmlrequest:URLRequest = new URLRequest(xmlurl);
xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);

xmlLoader.load(xmlrequest);
function xmlcompleteHandler(event:Event):void {

var loader:URLLoader = URLLoader(event.target);
var succData:String=loader.data;

    var xmlData:XML = new XML();
    var xmlList:XMLList;
    xmlData = XML(loader.data);
    xmlList = xmlData.children();

    for (var i=0; i<xmlList.length(); i++) {
        for (var n=0; n<xmlData.UserHumanap*.HumanapDot.length(); n++) {
                
                var x_coordinate:Number = xmlData.UserHumanap*.HumanapDot[n][email protected];
                var y_coordinate:Number = xmlData.UserHumanap*.HumanapDot[n][email protected];
                var point2: Point = new Point(x_coordinate,y_coordinate);
            
                var circle:Sprite = new Sprite();
                circle.graphics.beginFill(0x00ff00);
                circle.graphics.drawCircle(point2.x,point2.y,3);   //Placing the data as dots on the swf file
                }
            }
        }
                
   }

Thanks in Advance…Please Help me…
its Urgent…

Thanks,
Swarthi