Skip to content

Instantly share code, notes, and snippets.

@jgranick
Created October 31, 2011 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgranick/1329311 to your computer and use it in GitHub Desktop.
Save jgranick/1329311 to your computer and use it in GitHub Desktop.
Now using NME instead
import nme.display.Sprite;
class SimpleHX extends Sprite {
public function new () {
super ();
var triangle = new Sprite ();
triangle.graphics.beginFill (0xFF0000);
triangle.graphics.moveTo (0, 0.5, 0);
triangle.graphics.lineTo (-0.5, -0.5, 0);
triangle.graphics.lineTo (0.5, -0.5, 0);
triangle.graphics.endFill ();
triangle.scaleX = 100;
triangle.scaleY = 100;
addChild (triangle);
}
public static main () {
new SimpleHX ();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment