loadMovie, swapDepths and setMask

How come I can set a mask to a dynamically loaded photo when I am building with Flash, but when the files are uploaded to the server and then viewed on the page, the mask is not working?

One example of this kind of usage is this puzzle.

This is and other problems are simply because of the following reasons:

  • Mask must have higher depth than the clip to be masked

  • Clip must be loaded completely before the mask can be applied

  • When the mask and the clip have both been moved to higher depths, the mask must be applied again.