I added a new Fire component to the FlexLib library. This is a Flex component that creates a fire or smoke effect. It can be customized in a variety of ways, including setting multiple colors for the flame. Check out the demo app below to see a few different presets I came up with. Try playing around with the different controls and you’ll get an idea of the different kinds of effects that are possible.

The key to this is using the perlinNoise function of the BitmapData class, and the DisplacementMapFilter. I don’t claim to be an expert on using these functions. Others have written about using them, I just copied the same approach.

View the documentation
View the example in a new window.

To get the source of the Fire component, download the FlexLib project from Google code.

And don’t complain about this using a lot of CPU horsepower, go get a faster machine :P Or look at the source and figure out how to optimize it for better performance and contribute the improvements back to FlexLib.

This movie requires Flash Player 9

Oh, and for anyone wondering, I’ll be releasing the source for the RSS reader that was shown at 360Flex… soon. Probably tomorrow. And it’s an even more pimped out version.

6 Responses to “Fire component added to FlexLib”

  1. Tom Chiverton says:

    Very cool.

  2. Jason says:

    Any examples in how to use on or in a button? Or can you just point us in the right direction?

  3. Toby de Havilland » Flex Fire Component says:

    […] Check it out! […]

  4. Toby says:

    I have been waiting to see if you would realease this. Very cool stuff!

  5. morganusvitus says:

    The site looks great ! Thanks for all your help ( past, present and future !)

  6. dougmccune.com » Blog Archive » Why I won’t enter the eBay Flex widget contest says:

    […] Today I was looking over the details of the eBay Flash/Flex widget contest and thought maybe I’d whip something together and enter. I figured I could probably throw together some eye-candy nonsense using PaperVision, Box2D, fire effects, etc etc and make something that looked impressive. Might be worth a shot at a cool $10k. Then I read the details a little closer and found this clause: […]

Leave a Reply