ok I had some time to do a quick example... You can tweak and add values to expressions if you like to get more accurate behavior. Its Maya 6.0 *.mb file I hope it helps