Mac OS X style dock

Hi all

I dunno if any of you guys saw, but a while back there were a couple of threads on here where people were working on making a mac os x style dock for use in a flash file.

I’ve been trying to work with the more basic of the 2 versions I saw.
This one involved having the following actionscript on a movieclip.

onClipEvent (load) {
	// Minimum and maximum scale (in percent) for this item
	maxSize = 100;
	minSize = 50;
	// Speed of rescaling
	scalespeed = 5;
	// Set offset - the distance from which the object starts to grow
	xoffset = 100;
}
onClipEvent (enterFrame) {
	// Scale setting - don't mess with this! :P
	if (_x>_parent._xmouse) {
		scale = _parent._xmouse+xoffset+(-_x);
	} else {
		scale = _x+(xoffset-_parent._xmouse);
	}
	// Limiting to maximum size
	if (scale>maxSize) {
		scale = maxSize;
	}
	// Limiting to minimum size
	if (scale<minSize) {
		scale = minSize;
	}
	// resizing
	_xscale += (scale-_xscale)/scalespeed;
	_yscale = _xscale;
}

This code makes your movieclip get bigger the closer you move the cursor to the center of it. However this is only true horizontally. You can have your cursor very far away, vertically, but if your X coordinate is within 50 pixels to that of your movieclip it will start getting bigger.

This feels a little uncontrolled for what I am using it for.

Anyone know how I could make it so you have to be within 50 pixels of the movieclip, vertically AND horizontally?

Any support would really be appreciated.
Cheers :pir:

I hope that makes sense. I always find it hard to explain myself on these technical matters in type. :sen: