Prototype problem

Hi

I am trying to create a prototype which can calculate the distance from the mouse to any object i apply the prototype to. The problem is this, when i apply the protoype to a movie clip which resides on the main time line (my code is also on the main time line) the code works and the distance of the mouse from the object is returned. However as soon as i try to apply it to a movie clip which is say in another movie clip the function will only return the value of the mouse distance from the maintime lines top left corner.

I am clearly not understanding something, i am new at this, sorry

Here is the code: //

MovieClip.prototype.bud = function (){
this.onMouseMove = function () {

xDistance = _xmouse-this._x;
yDistance = _ymouse-this._y;
myDistance = Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
myRound = Math.round(myDistance);
}
}

_root.flower_mc.bud_mc.onEnterFrame = function() {
t_txt.text = myRound;
_root.flower_mc.bud_mc.bud();
}

thanks