views:

745

answers:

4

I found a Flash program online that would be perfect for a project I'm working on. Obviously with web content you can usually just use your browser to view the source code of whatever HTML, PHP, etc that you may be looking at. But when it comes to Flash it seems we're left in the dark in terms of viewing source code.

Is there any way to view the source code for a Flash swf that you download?

Note: As to whether stealing Flash code is morally reprehensible, perhaps that would be better suited for a different question.

+1  A: 

You can use ActionScript Viewer:

ASV

Also, there are a lot of Flash decompilers out there (SWF->FLA):

Trillix

Sothink

euge1979
Thanks a lot man, the Sothink decompiler is exactly what I was looking for.
Bijan
+1  A: 

Flash is, for the most part, compiled. You cannot view the original source. You can decompile Flash files. However, the result will not likely be readable.

What do you need the source code for? If it's for a particular effect (some 3D voodoo you have no clue about), ask the author how it's done instead of trying to reverse-engineer yourself. That'd be easier, anyway.

strager
A: 

It is actually possible for Flex SWFs to be compiled with the source code bundled inside, although this is at the discretion of their author and is typically only done for tutorials or didactic examples (as it increases SWF size slightly). Right-click on a SWF in a web page and if the "View Source Code" option appears, then you're in luck.

erikprice
+1  A: 

There's no source code in a .swf - that's the compiled product. The source code is in the .fla.