Mask with script

Hi all

can you make a mask with actionscript???
because my .swf is getting to big in kb “size”