How do you decompile a swf file

FlashDecompiling

Flash Problem Overview


I am the maintainer of a site that has allegedly 'lost' the source code to a flash swf file. How do I decompile this source?

Are there any programs online or offline that I could use?

Flash Solutions


Solution 1 - Flash

Usually 'lost' is a euphemism for "We stopped paying the developer and now he wont give us the source code."

That being said, I own a copy of Burak's ActionScript Viewer, and it works pretty well. A simple google search will find you many other SWF decompilers.

Solution 2 - Flash

erlswf is an opensource project written in erlang for decompiling .swf files.

Here's the site: https://github.com/bef/erlswf

Solution 3 - Flash

Get the Sothink SWF decompiler. Not free, but worth it. Recently used it to decompile an SWF that I had lost the fla for, and I could completely round-trip swf-fla and back!
link text

Solution 4 - Flash

I've had good luck with the SWF::File library on CPAN, and particularly the dumpswf.plx tool that comes with that distribution. It generates Perl code that, when run, regenerates your SWF.

Solution 5 - Flash

I've used Sothink SWF decompiler a couple of times, the only problem is that as project gets more complex, the output of decompiler gets harder to compile back again. But it ensures that you can get your .as files most of the time, compilable fla is a question.

Sothink SWF Decompiler

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNathan FegerView Question on Stackoverflow
Solution 1 - FlashdavrView Answer on Stackoverflow
Solution 2 - FlashLee HView Answer on Stackoverflow
Solution 3 - FlashRobert JeppesenView Answer on Stackoverflow
Solution 4 - FlashChris DolanView Answer on Stackoverflow
Solution 5 - FlashymutluView Answer on Stackoverflow