Drawing rectangle x y position problem

Hello all,
Plese look at my source.
public function onMouseDownHandler(e:MouseEvent) {
//trace(“mouse down clicked!”);
if ( e.target is Stage )
GL.mouseIniX = mouseX;
GL.mouseIniY = mouseY;
case “rect”:
GL.draw_obj_id ++;
// Create our new square and add some listeners to it to enabled dragging
var mc:MovieClip = new MovieClip();
mc.buttonMode = true;
mc.name = "Rect
mc.addEventListener(MouseEvent.MOUSE_DOWN, startDraging);
mc.addEventListener(MouseEvent.MOUSE_UP, stopDraging);
addChild( mc );
GL.activeObject = mc;
// Hold a reference so we can update its graphics using the drawing API
GL.mcRef = mc;
// DRAW!
stage.addEventListener(Event.ENTER_FRAME, square);
case “txt”:
trace(“text tool not yet!”);
case “line”:
trace(“line tool not yet!”);

public function square(e:Event):void
GL.mcRef.graphics.lineStyle(3, 0x000000, 1.0);
GL.mcRef.graphics.beginFill(0xff9900, 1.0);
GL.mcRef.graphics.drawRect(GL.mouseIniX, GL.mouseIniY, mouseX - GL.mouseIniX, mouseY - GL.mouseIniY);

I am drawing a rectangle with the above code in as3 inside a area.
Problem is that,
when i try to acees the drawn rectangle x and y position it is showing 0,0.
why is this?
if i drag the drawn rectangle and try to access the x and y position then also it is calculating from the 0,0 position.
first time when i draw the rectangle it is drawing well by dragging the mouse but why the x and y axis is 0,0;
if i try to set the x and y position manually then when i try to draw by dragging , it is not drawing relative with the mouse.
If any body have any idea please share it with me.
I have spend lot of hours to do that but failed to solve it.
Thanks in advance