My "actionscript school" years ago was levitated.net.
Since then, my favorite code is "Emotion.Fractal".
See the working demo here or in twitter.char95.com.
The algorithm can be explain in the next steps:
- Given a rectangular area defined by two points, place an arbitrarily sized word anywhere within it.
- Randomly, align the word to the borders, and further subdivide the remaining area into two new rectangles.
- Add the new rectangles in a queue and repeat the process for each element in the queue.
We also need to have a limit on the depth of the recursive call to limit the size of the region to be filled.
The code is quite a mess right now, but I'm working to improve the "filling algorithm" and use it in new experiments. So I'll upload the final class pretty soon.