Fun with Alpha Masks in Flash
I was able to think of a very rough game idea on the walk home so I started sketching some ideas on paper. I knew that I’d need to get Alpha Masking working in Flash to make my idea work. I’d never done Alpha masking in Flash so I started to prove out this tech.
Build 001 took a couple of hours to get working. Note to everyone wanting to do Alpha Masking in Flash… .cacheToBitmap is the trick. Do this on the target Bitmap you want to mask, as well as on the Sprite you are using as the mask object.
For Build 002 I decided to try and hack together some of my old tile engine code. This again took longer than anticipated mostly because I was copy and pasting from wrong directories. Doh. Anyway, an hour or so later and I had this working. You are seeing a tile layer being masked by a sprite that has alpha blobs moving through it. The hero object is not affected by the masking because she exists in a separate object.
I’ll muck around for another hour or so tonight before I rest up for tomorrow.

