Any tool to disassemble Flash?

I’m going back and forth with a potential client. He wants me to modify his web site, to create a version in Arabic.

The problem is, he doesn’t actually have a website, he has a Flash container. The person or firm who created the Flash stuff hit the limits of their knowledge and was apparently not able to make an Arabic Flash file. So I told him that neither I, nor anyone else, could modify the swf file without the original elements.

So, is what I said the truth? Is there some tool I’m not aware of that will allow someone to completely disassemble a swf file and modify the text?

Google “Flash Decompiler.” There’s a few out there. I’ve only decompiled to extract resources–I’ve never tried to recompile, so I don’t know how well these tools work in that direction.

I have occasionally used the So-Think decompiler.

How useful is the result? Are the text elements editable?

I’ve used Buraks actionscript viewer, which allows both viewing and decompiling.

I have successfully rescued projects at my previous work where the source .fla was missing, but - the way these things decompile means that the person taking over the newly created .fla MUST have a decent knowledge of flash, particularly optimisation.

No original variable names will be retained, and elements will be distributed across many layers. You’ll need to spend some time fixing the resuscitated .fla before it is usable.

In any case, unless the original flash designer made the text easily modifiable via CMS or XML, you will have a huge amount of work finding blocks of text and replacing them with Arabic.

In short, I would suggest that it may well be easier to recreate the site from scratch, properly, rather than monkey around with a decompiled version. However, both Buraks and Sothink offer free limited trials (as far as I can recall) so it is worth a try to see what the output is like.

As I was driving home yesterday I realised that there is in fact a way to do this with the original, leaving it compiled.

It will not be pleasant, but assuming all text is hard-coded into the flash file…

Run the .swf in the Flash Debug Player. One of the menu options should be “Debug”, and under that “List Variables”

This will give you a list of all objects- including textboxes and their current value.

You must copy all this info, leaving out any objects that do not have text.

Now, for your new, arabic version, create a new .fla the correct size. Onstage, place an empty movieclip at 0,0

Load the old swf into this clip using loadMovie

With a preloader, work out when it is loaded, and then using the list of textboxes, loop through and replace the text with the japanese equivalent.

Not easy, but could be easier than the above…

Create a new fla

Thanks for the responses.

Right now, the potential client is only at Stage 1 of the “Five Stages of a Bad Website”. I got “Denial” and “Anger” in the first e-mail, I’m expecting “Bargaining” next.

it sounds like the client hit the limit of his competence too, when he managed to fail obtain the code base from the coder before ending work with him.

Why doesn’t he look the coder up and pay him for the code base now? Maybe the coder will charge less for existing code than another coder would charge for writing from scratch?