/ Published in: ActionScript 3

This is handy for quickly creating you own rectangular masks on-the-fly.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import flash.display.Shape; var rectMask:Shape = new Shape(); rectMask.graphics.beginFill(0xFF0000, 1); rectMask.graphics.drawRect(0, 0, 320, 240); rectMask.graphics.endFill(); displayObjectToBeMasked.mask = rectMask;
Comments
