Posted By

edsonpavoni on 12/11/09


Tagged

image jpg png gif embed example external as3 bitmap embedded


Versions (?)

Embedded Image in Flash


 / Published in: ActionScript 3
 

  1. package {
  2.  
  3. import flash.display.Sprite;
  4. import flash.display.BitmapData;
  5. import flash.display.Bitmap;
  6.  
  7. class EmbeddedImageExample extends Sprite
  8. {
  9. [Embed(source='photo.png')]
  10. private var photoClass:Class;
  11. private var photo:Bitmap;
  12.  
  13. function EmbeddedImageExample()
  14. {
  15. photo = new MyPhoto();
  16. var bmp:BitmapData = photo.bitmapData;
  17. }
  18. }
  19. }

Report this snippet  

You need to login to post a comment.