I want to try to make an app that generates flash movies. There are many flash generators to be found on the internet. Most of them is to create menus or text or banners. Some can be downloaded to make flash surveys.

My question is how are the flash generator made. I can gather I need a compiler to make swf-files. But what else do I need to write java apps that generates flash movies?