Tree generator in 25 lines of ActionScript
I am writing a bit late, but just wanted to share that I as well had submited my entry for the The 25-Line ActionScript Contest – Tree Generator. For those not yet informed the competition is a revamp of the 2000 Flash MX 6 ActionScript 1 version, made alive by Keith Peters. on time with the release of Flash CS4. It is planned as a regular contest with cool prizes, starting with Adobe CS4 Suite.
Flash has changed a lot during the years and some folks are complaining that AS has become harder, too verbose, and that it takes more code to do the same things compared to AS1. I see this competition as a part of Keith Peters’ initiative to put the Flash Back in Flash.
As I am always amazed by the fields where technology touches the real world, I wanted to build something connected to nature. I know that other have already made really nice trees, but I saw some space for optimisation – sorry, Grant, but trees don’t grow that way. So, I made a growth animation, from a small culm to a full-grown tree only in 25 lines. I did not made it into the top 12, but I still want to share. Take a look at the code and swf and see the November/December Finalists.

There’s enough room for a BitmapData buffer display that could avoid lagging since you’re adding that much MovieClip
fh
11 Dec 08 at 14:06
Why are you using MovieClip? MovieClip is extremely slow. It’s why Sprite is available now, and, in fact, Shape is even lighter. If all you’re doing is drawing in graphics, use Shape not MovieClip.
Steven Sacks
11 Dec 08 at 18:26
This version uses MovieClips to be able to contain dynamic variables on what I rely. But after seeing those examples who got into final, I must be capable to improve my other version, no MovieClips there. Hope I’ll manage to make something worth another try.
edzis
11 Dec 08 at 21:53
[...] végétaux en Actionscript se basent sur une implémentation naïve à base de récursivité, avec plus ou moins de succès. Ce type d’implémentation nécessitant un appel systématique à des constantes aléatoires [...]
L-Systems : “put the Flash back in Flash” ? | blog.entremidietdeux.com
6 Jan 09 at 21:23
Huhu, i saw it grow as a small baby.. taking some colors and loosing lines!
Thanks for sharing, go for the next CS4’s rush!
Djamel
16 Jan 09 at 15:50
Oh, thanks, mate! Hope my latest entry will get into the finals.
edzis
16 Jan 09 at 16:04