topical media & game development
#graphic-flex-image-effects-01-Flex-DrawTrianglesVerticesTest.ax
#graphic-flex-image-effects-01-Flex-DrawTrianglesVerticesTest.ax
[swf]
[flash]
flex
package {
import flash.display.Sprite;
[SWF(width=550, height=400, backgroundColor=0xFFFFFF)]
Demonstrates simple use of drawing triangles using a sold fill.
public class @ax-graphic-flex-image-effects-01-Flex-DrawTrianglesVerticesTest extends Sprite {
Constructor. Handles the drawing.
public function @ax-graphic-flex-image-effects-01-Flex-DrawTrianglesVerticesTest() {
var vertices:Vector.<Number> = new Vector.<Number>();
vertices.push(100, 50);
vertices.push(150, 100);
vertices.push(50, 100);
graphics.beginFill(0xFF);
graphics.drawTriangles(vertices);
graphics.endFill();
}
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.