var triangle:Shape;
drawTriangle(0, 10, 100, 0xFF0000);
function drawTriangle(x:Number, y:Number, height:Number, color:uint){
triangle = new Shape;
triangle.graphics.beginFill(color);
triangle.graphics.moveTo(height/2, y);
triangle.graphics.lineTo(height, height+y);
triangle.graphics.lineTo(x, height+y);
triangle.graphics.lineTo(height/2, y);
addChild(triangle);
}
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 Triangle
Posted by
admin
on Wednesday, October 21, 2009
Labels:
Graphics
1 comments:
It is your colourful blog that brings me a lot of knowledge about living.
Cara Instan Menyembuhkan Penyakit Kutil Kemaluan Tanpa Pembedahan
Post a Comment