Search Flex Samples

Fire component added to FlexLib

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.

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.


Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples