Image multi mask transition effect

Hello guys,

http://www.dyeprecision.com/home.html

According to the link above, I would like to know how do i make this masking transition effect.
I believe it is made by using Action script. But i cant figure out how to write the script.

Any help will b gladly appreciate. Thank you