Masking draw object effect... with AS

i have a simple .fla here which by using masks appears to “draw” a wavy box… (kinda choppy, just made it fast for example), what i am wondering is if there is a same way to achieve this effect through actionscript (not just draw a box, but to reveal any picture or shape, for a “drawing effect”)

http://a2webdesign.com/jarvis/maskthing.fla for the fla :}

hope someone can help me, i’m kinda newish to AS, not much more then basics.