As I've made up my mind to learn Flash, and don't want to pay a honkin' amount of cash, I decided to go with a free Flash IDE called FlashDevelop.

Since I'm toying around with the idea of sidescrollers, I did a search for "Flash sidescroller tutorial" and found this excellent 3-parter by  Unfortunately (for me), the tutorial expects that you're using Adobe's Flash IDE.  Thus, as a contribution to the web (and myself... mostly myself), I translated the tutorial to work with FlashDevelop.  Read on to see how I did it, or just grab the source here.

There are basically only 3 elements in the DevNote tutorial that require the Flash IDE.  They are the Boundaries, Player and StartMarker MovieClips.

As the StartMarker was just a point, I used the Point class to represent it (and called it _startPos instead). Since Boundaries and Player were basically sprites, I represented them using the Sprite class. Here is the pertinent code:

public class Main extends MovieClip 
    private var _startPos:Point;
    private var _player:Sprite;
    private var _boundaries:Sprite;    
    public function Main():void {
        // Assign defaults.
        _startPos = new Point(100, 10);
        _player = new Sprite();;, -50, 20, 50);;
        _player.x = _startPos.x;
        _player.y = _startPos.y;
        _boundaries = new Sprite();;, 100, 110, 20);, 150, 110, 20);, 0x0000ff);, 300);, 100);, 100);, 100);, 200);, 200);;

I also change the code slightly in the case of the key handlers (I used constants for the key codes isntead of magic numbers) and used a do ... while loop for the collision detection.