Embedded Image in Flash


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.