How to do this?

http://www.firstbornmultimedia.com/websites/081_vs_bluelondon/index.htm

mask??

lol yes… just fool around with easing, masks, and scaling with your tweens.

It could also be hitTest being usd as well. When the moving objects hit each other they change. Take a look at this tutorial.

http://www.kirupa.com/developer/actionscript/hittest.htm