Masking Drawing API?

is it possible to make something drawn using actionscript into a mask?, I tried dissecting some of the more relevant tutorials, but nothing seemed to work.