Posted By

mixfm on 06/24/11


Tagged


Versions (?)

Embedding Image in Flash Builder AS3


 / Published in: ActionScript 3
 

URL: http://blackglove.com.au

  1. package
  2. {
  3. import flash.display.Bitmap;
  4. import flash.display.Sprite;
  5. public class Example extends Sprite
  6. {
  7. [Embed('your-image.png')]
  8. private var ImageAsset : Class;
  9.  
  10. public function Example()
  11. {
  12. var i:Bitmap = new ImageAsset() as Bitmap;
  13. addChild( i );
  14. }
  15. }
  16.  
  17. }

Report this snippet  

You need to login to post a comment.