Basically, you just create a Sprite object, draw to the Graphics object within the Sprite, and then attach the Sprite to the stage.
First select Project->New Project, select an AS3 Project, give it a name, and check the "create a new directory for the project" box. FlashDevelop will create the project and give you a Main.as with a bit of starter code in it.
Quick sidenote: If you hit F5, the project should compile and produce a blank Flash window since you've technically got enough to qualify as a Flash application even if it doesn't do much.
Edit Main.as and where you see the import statements at the top, add the following:
import flash.events.TimerEvent;
import flash.utils.Timer;
Right after:
public class Main extends Sprite
{
Add:
private var triangle:Sprite;
private var timer:Timer;
And right after:
// entry point
Add:
triangle = new Sprite();
triangle.graphics.beginFill(0xFF0000);
triangle.graphics.moveTo(5, 0);
triangle.graphics.lineTo(0, 5);
triangle.graphics.lineTo(10, 5);
triangle.graphics.endFill();
stage.addChild(triangle);
triangle.x = 100;
triangle.y = 100;
timer = new Timer(2000, 5);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
Finally, after the closing bracket "}" for the init function, add:
private function onTimer(e:TimerEvent): void {
triangle.scaleX++;
triangle.scaleY++;
}
What this does is it creates a triangle and increases its size every 2 seconds, stopping after 5 increases. The main drawing bit is the triangle.graphics stuff. Once it's done drawing on the Graphics object within the Sprite object stored in the triangle variable, then it attaches it as a child to the stage which is what makes it show up.
Another thing you can do is embedding bitmaps. What you do is you add the image (such as a .png) to the lib directory. Then create a new class -- in the project window, right-click on src and select "New Class..." and give it a name ("MyImage" in this example). Part of the class will look something like this:
public class MyImage
You want to change it so your class extends the built-in Bitmap class:
public class MyImage extends Bitmap
Then you want to create a blank line above that line. While your text cursor is still on that line, go to the project window, right-click on your .png file, and select insert into document, which will give you something like this:
[Embed(source='../lib/image.png')]
public class MyImage extends Bitmap
Then when you instantiate the MyImage class, it'll show image.png. You'd do that like this (for example at the "// entry point" in Main.as):
var image:MyImage = new MyImage();
stage.addChild(image);