Help with Scriptable Mask

The tutorial I am referring to is http://www.kirupa.com/developer/actionscript/scriptable_masks.htm

I tried to make my own version of it but am confused about where to put insert the actionscript code. I also would like the front end and the back end to be links so that when you click on either side there is a popup window linking to two different pages.

This is the .fla file and what I have so far.
http://www.blatantdream.com/drag_index.fla