How do you do this masking technique?

:look: Hi

Please see link below:

http://www.templatemonster.com/flash-templates/13425.html

Can anyone give me some pointers as to how to achieve the masking effects that are applied once a thumbnail is clicked in the gallery section of this template:

I think it is the same mask that is just dynamically applied to the appropriate graphic/movieclip but how is this done?
Also, somehow the layers are put in the correct order depending on what thumbnail is clicked on.
Should I be using setMask()?
Should I be using linkage of movie clips in my library or should all the movieclips I need to use already be on the stage?

If anyone can help me get started with this I’d really, really appreciate it.

Cheers

Push76