Skip to content

Instantly share code, notes, and snippets.

@jgranick
Created February 7, 2012 20:30
Show Gist options
  • Save jgranick/1761759 to your computer and use it in GitHub Desktop.
Save jgranick/1761759 to your computer and use it in GitHub Desktop.
How to display a bitmap (NME recipe)
import nme.display.Bitmap;
import nme.display.Sprite;
import nme.Assets;
/**
* @author Joshua Granick
*/
class DisplayingABitmap extends Sprite {
public function new () {
super ();
var logo = new Bitmap (Assets.getBitmapData ("assets/nme.png"));
addChild (logo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment