flash on 2010-9-20

by TmskSt
♥0 | Line 19 | Modified 2010-09-21 00:53:57 | MIT License
play

ActionScript3 source code

/**
 * Copyright TmskSt ( http://wonderfl.net/user/TmskSt )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/hdvg
 */

package {
    import flash.display.BlendMode;
    import flash.display.Shape;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            this.blendMode = BlendMode.LAYER;

            this.graphics.beginFill(0x222222);
            this.graphics.drawRect(0,0,stage.stageWidth, stage.stageHeight);
            this.graphics.endFill();
            
            var mask:Shape = new Shape();
            mask.graphics.beginFill(0x0);
            mask.graphics.drawCircle(0,0,100);
            mask.graphics.endFill();
            mask.blendMode = BlendMode.ERASE;
            
            this.addChild(mask);
        }
    }
}