What better image to use for a flag effect than an image by Derek Riggs (which you already have on your living room wall right? Not?)
Click on the flag !
Anyway, in this example I’ve experimented with using perlin noise as a displacementmap, and overlaying the same displacement map for a lighting effect. The lighting effect was tweaked using a colortransform, and the falloff on the flag (the right side is much more affected by the wind than the left side) was realized by mixing the perlinnoise map with a gradient. Here is the complete example with sourcecode included: Flag Effect (3812 downloads) . Note that Example1.as to Example4.as should be run from the flashdevelop project nummero uno, while this example (example5) should be run from project nummero duo. Example 1 – 4 just experiment with the basics, and the last example puts it all together with documentation.