Creating a swf with byteArray

I am trying to create a new swf with AIR and Flash CS3. All I want to do is push a button and have a new swf saved to the desktop with a line of actionscript in it. The actionscript can be anything – stop(); - for instance.

I have been messing around with ByteArray and I can save an image to a swf but I can’t find any information on what I want to do.

Any help would be greatly appreciated; this has got me stumped.