Embedding a bitmap at compile time : Bitmap : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Bitmap »

 

Embedding a bitmap at compile time


 
package {
  import flash.display.*;
  import flash.events.*;
  import mx.core.BitmapAsset;
    [Embed(source="photo.jpg")]
  public class Main extends Sprite {

    private var Photo:Class;

    public function Main(  ) {
      var photo:BitmapAsset = new Photo(  );
      addChild(photo);
      trace(photo.bitmapData.getPixel(00));
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Graphics
» Bitmap