Archive for the 'Flash' Category
While working on Flash sidescroller stuff I noticed that there was no easy way (that I could find) to create multiple sprites from a single bitmap (something you’d do when doing a tile-based graphics layout).
Here’s some example usage:
var factory:SpriteFactory = new SpriteFactory("assets/sprites"); factory.loadBitmap("grass", "block-grass.png"); var grass1:Sprite = factory.newSprite("grass"); var grass2:Sprite = factory.newSprite("grass");
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 devnote.org. 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.