Hello again

I'm having a little problem with this code, the idea is that the cat object follows the main character around and performs certain actions when the character is in range or out of range. on the whole the code is absolutely fine:

Code:
onClipEvent (enterFrame) {
	
	if (Key.isDown(Key.UP)&&((this._y - _root.Cat._y) <25)) {
		this.gotoAndStop("catstill");
	}
...