This script will automatically setup a "module" of three shapes where a star shape been wired to the other two via position and rotation constraints. The control is estabished through a couple of custom attribute sliders on the star. It allows you to animate the sliders of the star to gravitate towards either the circle or square, regardless of what the other shapes are doing. You can also freely animate the star as long as both sliders are to the left (off).
For more details on how this method of animating works in practise, please visit this AREA talk "Layers of Control"...
Full credit for the idea of this module-based method goes to Grayson Chalmers, who has inspired me to write this script.

Updates:
Version 1.1;
- Contact email changed.
- Recoded script as a struct to minimize global variables.
Version 1.0;
- First release.
By lbrooks