Draw in MX; how do I add a mask to limit drawing space?

Ive managed to create other colors by adding new movieclips. But how do I mask off the drawing board to limit where the lines are drawn?

Is it another level on top with a mask? )if you are even able to mask through levels…)

Or somehow restricting the movement of the new “line” movieclip?

Note the usage of “somehow”, because i dont know…


You can draw a big square on your scene, turn it into a movie clip, give it the instance name ‘mask’, and then add this code to the rest of the code :

 _root.setMask (mask) ;

I guess you could as well use the drawing API to draw dynamically the mask.

pom 0]

Can you mask through layers?

If the set mask is on _level2, will it affect _level1?

Im creating a drawing file based off the tutorial and am trying to limit the drawing field so as not to scribble on the erase button.