/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var triangleHeight:uint = 100; var triangleShape:Shape = new Shape(); triangleShape.graphics.lineStyle(1,0xff00ff00) triangleShape.graphics.beginFill(0xff0000); triangleShape.graphics.moveTo(triangleHeight/2, 5); triangleShape.graphics.lineTo(triangleHeight, triangleHeight+5); triangleShape.graphics.lineTo(0, triangleHeight+5); triangleShape.graphics.lineTo(triangleHeight/2, 5); addChild(triangleShape);