External .swf compiler

I have written some actionscript that generates actionscript (just procedural code, not class files). I was wondering if anyone knows of an external .swf compiler?? I would like to compile many blocks of generated AS into seperate .swfs that I can then load into a running movie.