Skip to content

Instantly share code, notes, and snippets.

@kylefox
Created December 1, 2009 04:24
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 kylefox/246050 to your computer and use it in GitHub Desktop.
Save kylefox/246050 to your computer and use it in GitHub Desktop.
private function onImageLoaded ( e : Event ) : void
{
// get bitmap from loader;
var image : Bitmap = Bitmap( m_loader.content );
// get bitmap data from loaded image;
var bmd : BitmapData = image.bitmapData;
// create image from bitmap data;
m_image = new Bitmap( bmd );
// turn image smoothing on;
m_image.smoothing = true;
// set bitmap size & position;
onResize();
// add image to stage;
addChild( m_image );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment