Generating .swfs on the fly?

All righty. I gotta question (I went thru the forum search, couldn’t find what I wanted…)

At work, we’re often asked to do some location maps (illustrator then animated in Flash), to fit the newsbreak - ie: a plane crash in Panama City, Panama. where the hell is Panama City? It’s HERE, see that map!!

So we thought… Heck. This is a boring job, would there be a way to have people with little to no ‘strator/flash do this for us??
So we thought… Why don’t we make a big vector map of the world, quite detailled and we store it in a library. And then, why don’t we make little icon and animated pictograms and put them in another library. And why don’t we let them drag n’ drop the elements they want to build the map thru a backoffice interface and when everything’s set, they click the “generate” button and a swf with the dragndropped elements is created dynamically…

So the question is… Can you generate a .swf file dynamically without going thru Flash and ctrl+enter? (eg: perhaps a command like PHP’s

$myfile = fopen("/home/newfile.swf", "w+")

Thanks :love: