Show the X and Y postions of a dragable object?

So I have a dragable object on the screen. I also have a couple of text boxes that are supposed to show it’s X and Y postions.

Now I can get it to show the postion it started in,using the getProperty. But when I move it the numbes won’t update. So I tried to do it the same way you would if you wanted the to get the postions of the mouse. That didn’t work either. Any body know how to solve this little problem? Thanks

Is the AS running through that every frame?

Or you haven’t put “_root.” before each reference to the objects in your code.

lets think your draggable MC is “MC1” which is on the root.
textBox which contain the position is text1.

here is the function:

_root.MC1.onEnterFrame = function(){
xValue = this._x;
yValue = this._y;
_root.text1.text = xValue+", "yValue;
}

sorry (Ammendment) :
_root.MC1.onEnterFrame = function(){
xValue = this._x;
yValue = this._y;
_root.text1.text = xValue+", "+yValue;
}