I was experiencing this same problem running AE CS3 under OS X (10.5.2). As I was troubleshooting, I realized that I usually had the export folder open in the Finder. During swf export, I started closing the folder where the flash file was being written and I haven’t had this problem since.
Food for thought.