Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Created April 14, 2011 11:55
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 mahemoff/919329 to your computer and use it in GitHub Desktop.
Save mahemoff/919329 to your computer and use it in GitHub Desktop.
var pen = new Graphics(); // I find "graphics" vague, so I call it pen!
stage = new Stage(canvas); // the display
pen.setStrokeStyle(1).drawCircle(0,0,RADIUS); // not really drawn yet
circle = new Shape(g); /* AHA now we have an object for the thing we haven't yet really drawn */
stage.addChild(circle); // Now it's drawn
// later on, we see the benefits of this cunning display
circle.x += 8; //
stage.update();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment