Outputting a new swf

i am beginning a project where users will upload images and input some text. this pieces would then be loaded into a flash video template of some sort and compiled as a new video file (likely an swf, but could be an mpeg or avi).

i’ve seen this done before, but don’t really know where to begin. can someone give me some guidance on topics to research or tutorials to check out that will help with this process?

thank you.