Welcome to my actionscript snippet library!

Actionscript Snips is a small repository of actionscript code that aims to save developers and designers time when developing a website.  

Draw A Circle


var circle:Shape;

drawCircle(100, 100, 75, 0xFF0000);

function drawCircle(x:Number, y:Number, radius:Number, color:uint){
circle = new Shape;
circle.graphics.beginFill(color);
circle.graphics.drawCircle(x, y, radius);
circle.graphics.endFill();
addChild(circle);
}

0 comments:

Post a Comment