CLICK HERE TO COPY
Actionscript:
// draw red circle
with (graphics) beginFill(0xFF0000), drawCircle(200,100,30);
// draw 100 gray circles
with (graphics) for (var i:int = 0; i<100; i++) beginFill(0x666666), drawCircle(Math.random()*200, Math.random()*200, Math.random()*10), endFill();
// draw a few lines
with (graphics) lineStyle(0, 0x000000), moveTo(10,210), lineTo(20,300), lineTo(30,210), lineTo(40,300), lineTo(50,210), lineTo(60,300);
Sometimes it's tedious to write lines and lines of Graphics class method calls. Using a with [...]