I’ve been wanting to do this for a while, but never got around to figuring out how. Until now.
With the help of this post I created a simple but very effective random lightning generator in ActionScript 3.
I was surprised at the simplicity of it, and the clear explanation on drilian.com helped a lot.
So here it is: the lightning generator.
EDIT: per request I’ve put the source files online. Download here.