var point:Point=new Point(0,0); var xy:Point =txt_user_name.localToGlobal(point); localToGlobal是相对全局的坐标。