This is probably a program someone made or developed to make this automoated, but you can do it by hand using masks and tweens.
Here is some information about those. Just google for those two words with the word flash in your search and you'll find all sorts of information.
http://www.flashperfection.com/tutor...-8--24366.html
http://www.adobe.com/support/flash/d...reating_masks/