I think you are asking what you use to compile as3 to a .swf file.
Is your source file a .fla or a .as file ? Keep in mind that a .swf is not a source file, it is the compiled file. So if you wanted to modify that on the fly, you could use the method suggested by anemgyenge above.
Otherwise, if "on the fly" is not your intention you'd need to decompile it - which doesn't really result in quality source as the decompiled symbols can be hard to work with.
Flash CS5 can compile to a .swf, and your main source file is a .fla and .as for code files.
Flex SDK can compile AS3 to a .swf, and you can use either Flex Builder or Flash Develop as an IDE for editing your as3 code.
FlashDevelop is free and you can get it here :
FlashDevelop Download Page
You need the Flex SDK to compile with FlashDevelop, so you'll need to get that here :
Flex SDK - you can use either 3 or 4
If you are looking to tinker with it, why not try out wonderfl.net. It is a little sloppy in terms of the layout of the site, but there is tons of code to learn from and you don't need to install anything!