Triangle
http://help.adobe.com/ja_JP/AS3LCR/Flash_10.0/class-summary.html
♥0 |
Line 17 |
Modified 2011-01-19 23:21:46 |
MIT License
archived:2017-03-20 07:45:37
ActionScript3 source code
/**
* Copyright fakestar0826 ( http://wonderfl.net/user/fakestar0826 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/qJXv
*/
//http://help.adobe.com/ja_JP/AS3LCR/Flash_10.0/class-summary.html
package {
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var vertices:Vector.<Number> = new Vector.<Number>();
vertices.push(100, 100);
vertices.push(200, 100);
vertices.push(200, 200);
vertices.push(100, 200);
var indices:Vector.<int> = new Vector.<int>();
indices.push(0,1,2);
indices.push(2,3,0);
graphics.lineStyle(0);
graphics.drawTriangles(vertices, indices);
}
}
}