The FireEffect class will takes a MovieClip and uses some complex filter effects to achieve a very basic ‘flame’. In its current form, the flame is just a distorted version of the MovieClip itself. I use a simple orange fire graphic to get the best results. Using an image with a lot of color or texture will seriously slow down the application.
It uses BitmapData, BlurFilter, DisplacementMapFilter and ColorMatrixFilter. Very processor intesive, and not nearly as smooth as Grant Skinner’s Blaze Demo, although to be fair, his was written in AS3. I’m still quite happy with the results.
The FireEffect class takes in the MovieClip and duplicates it over and over again, distorting, blending fading each clip. After a few iterations the duplicate MovieClip is removed. Click here to download the project files and source. It really looks much better when its not running in the browser – I’m doing some research into why this is.