Placing a mask over the random motion movie

I recently followed kirupa.com’s random motion tutorial. It all worked fine but now i wish to place a mask ove it so it apears through a ‘window’ in my movie.
For example, imagine the red part below is where i want the random motion visible and the black part is where i wish it to be hidden:
.

I know this can be acheived because it apears as a banner on the kirupa site. If you need to know i am using Flash mx. Thanks in advance, Tid

P.S. I have already tried simply placing a mask over the layer with the actions script on.