2D Metaballs
The key to this effect is that the ball’s source image is a radial gradient. When the balls overlap the intensity of the blacks are essentially added together. I do this with alphas, but it may be more efficient to use a blendmode. The image below shows the source bitmap of metaballs. Then all the pixels above certain gray threshold are copied to the display bitmap. In the left most example any pixel darker than 0×808080 is copied in black to the display bitmap. The other examples copy the source multiple times in different colors at different thresholds.

The source code is not especially optimized or well documented but it should get you started. I use the TweenMax API found over at GreenSock. You will need to download it to use the examples.
Download the source code.
Here is an example of the metaballs in action: Spawn Pool