This tutorial will show you how to use FlashDevelop and the Haxe programming language to build a Flash application to display an embedded image.
Step 1:
Import an image into your FlashDevelop project. You can do in one of two ways.
If you have imported the image correctly you will see it listed in the project tree in FlashDevelop as in this picture.

Step 2:
Adding the image to the asset library.
Adding the image to the asset library tells FlashDevelop to embed the asset into the Flash application.
If you have successfully added the image to the asset library it will display with blue text in the project tree.

Step 3:
Create an image class.
To be able to access the image Haxe needs a class that extends BitmapData for the embedded image to reference. This is the class you use in your code as a BitmapData object.
Step 4:
Reference the image class from the embedded image.
The FishBitmapData class needs to be able to reference the embedded image, this is done by setting the image id in the asset library.

Step 5:
Create a bitmap.
Create a new Bitmap using the embedded image as the BitmapData and add it to the stage.
var bitmap:Bitmap; bitmap = new Bitmap(new FishBitmapData(), flash.display.PixelSnapping.ALWAYS, false); flash.Lib.current.addChild(bitmap);
Example:
Credits:
The fish picture comes from “Fishing Girl” art by Daniel Cook (Lostgarden.com)
Software Versions Used: