Effects and the Gory Details

A touch of Gothic at Flash and Math. We present dynamic blood dripping effects. The effects are very easy to customize. You can make any display object drip blood, you can change the amount of blood, the speed, the splashing effect. Just download the well-commented code in the zip file linked below and play with it. Click each screen shot or a text link below to open a Flash movie.

Blood flowing in streaks:
Dripping Blood:


  • Download all source files corresponding to these effects: Blood.zip

Download the zip package linked above for the complete, cutomizable source code.


In the zip package above you will find two fla files corresponding to the two effects presented here and a package of the custom AS3 classes. Simple and short Timeline code in each of the fla files uses items placed on the stage and our custom RainDisplay AS3 class to create the blood effects.

The MovieClip containing the word 'Blood' is placed on the Stage and given an instance name mcText. You can replace this clip by any display object. To mark points from which the blood streaks originate, we placed on the Stage instances of a MovieClip mcSpot and named the instances 'spot1', 'spot2', ....,'spot25' etc. To mark points of origin for your display object, simply move the spots, remove some or add more of them if you wish. Just be sure to give them instance names beginning with 'spot'. The Timeline code looks for all children whose names begin with 'spot' and places blood streaks there.

You can customize nearly all elements of your animation like colors, speed, the amount of blood, the splashing effect, by simple modifications of the Timeline code in each of the fla files. The Timeline code creates an instance of our custom RainDisplay class, called 'display'. The class takes care of creating dripping blood streaks at designated spots based on the values of variables defined on the Timeline like waitCount, dropsToAddEachFrame etc. The class is very flexible and has many public properties and methods that make customization easy. You can see those methods and properties in action in the attached fla files. For example, a simple change on line 42 in the Timeline code of BloodDripping.fla from dropsToAddEachFrame=1 to dropsToAddEachFrame=10, will produce a large amount of dripping blood. So will decreasing the value of waitCount to, say, 2.

The code is well-commented and ready for you to play with. Enjoy!

Related Tutorials

The blood effects use the same custom AS3 classes as our rain animations:

Rain Animation with Splashing Raindrops - AS3 Effect.

You will find there a detailed description of the RainDisplay class.

Back to Flash CS4 Tutorials              Back to Flash and Math Home

We welcome your comments, suggestions, and contributions. Click the Contact Us link below and email one of us.

Adobe®, Flash®, ActionScript®, Flex® are registered trademarks of Adobe Systems Incorporated.