I know it’s been done already, but I want to use a similar idea to that icon dock in Flash as my site navigation bar. My script for resizing items thus far:
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;
}
The FLA is attached… not that this is meant to be of any interest to anybody, I just want a backup in case I mess it up really.