Embedding Image in Flash Builder AS3


/ 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.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. }

URL: http://blackglove.com.au

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.