This site is now just an archive over the rise and fall of Flash. The domain flashmagazine.com is available for sale
Login | Register
Review: Trillix Flash Decompiler 4

Review: Trillix Flash Decompiler 4

Back in October 2007 we took a look at the Trillix Flash Decompiler 3. Since then the guys at Eltima have been hard at work on the big new features in version 4. Last week we took a look at decompiler support for Flex projects and Flash Player 9.

What is it?  SWF Decompiler
Platforms:  Windows 4.0 and Mac 3.2
Manufacturer:  Eltima
Website:  http://www.eltima.com
Cost: $79.95 personal, corporate bundles available

Installation was pretty much as I remember it from last time. Sadly the browser plug-in didn't install on Firefox, claiming it "does not provide secure updates". I spoke to Eltima about this and they assure me this is now fixed.

The interface adopted in version 3 remains unchanged, as do the major sections: Manage, Extract, Convert, Edit and Search. The icon ribbon along the top of the application will be familiar to existing users as well as anyone who has worked with the latest versions of Microsoft Office.

As I mentioned in the introduction the big feature this time around is support for Actionscript 3 and Flex projects. So here's the plan: I've got three projects, each built slightly differently. I'm going to disassemble them, look at the results and attempt to recompile them again. Here's how we got on...


Flash CS3 FLA with Actionscript 3
The first project is a fairly simple proof of concept UI I put together for a zooming timeline.  This should be the simplest project of the three as it's structure is closest to that created by previous versions of the decompiler.

Recompilation only took a few seconds and the decompiled FLA is opened in the Flash IDE. Two things hit you immediately. The first is that all your layer names are gone. This is to be expected as layer names and code comments don't get compiled. The second is that sudden feeling of painful nostalgia when you see the Flash Project panel. As well as decompiling the SWF, Trillix also creates a Flash project file (.FLP) file for you. There can't be many programmers left who still use the Flash IDE for coding but I love the fact that they went to the trouble of building this feature.

Now for the recompilation test. Well it almost worked but I don't think the failure anything to do with the decompiler. Functionally everything worked great but all the dynamic fonts were missing. When you think about it, the Flash compiler turns font glyphs into shapes at compilation time. If you don't have the required fonts on your machine when you recompile (I was on a different box) then those glyphs will be missing.

I think if anything this is a reminder that a decompiler will only get you so far in rebuilding a project. It does the crazy hard bit of regenerating all your code but you'll still need to source a lot of the assets.


Actionscript 3 only project built with FlashBuilder
This is a pure AS3 project that makes use of the Papervision3D framework. I'm curious to see how the decompiler deals with .SWC files and a complicated codebase. It should handle SWCs okay as they are essentially just ZIP files containing Actionscript. Anyway, here goes...

Again recompilation was quick. No sign of a SWC in the resulting source but all of the PV3D framework was there. This makes sense I guess as SWCs are turned back into AS3 at compilation time. Dropping back into FlashBuilder I took a look at the decompiled code. This time, not so good. The original project code seemed fine but the PV3D framework was strewn with errors, 102 to be exact.

Now FlashBuilder can get a little 'warning happy' so that's not necessarily a reason to panic. Looking through the problem list it turned out that 72 of those errors were in the DisplayObject3D class and they were all coming from two functions: hitTestPoint() and hitTestObject(). Looking at the code these were definitely decompiler failures. All references to the local variable 'obj' had been replaced by the directory path to the project.


image
Fixing this project is relatively simple. I just swapped out the generated PV3D classes for a set from the PV3D repo. What it shows though is that there are still some bugs in the decompiler that need to be worked out.

UPDATE: I've been advised by Eltima that unchecking the "Recover arguments' names" checkbox on "Convert" Tab->"General" tab in "Conversion Options"->"ActionScript" group should help with functions errors.



Flex project built with Flashbuilder
The last project I wanted to test was a simple project I worked on recently that makes use of  the charting components in the Flex framework. The app renders a group of financial charts based upon some feeds and params passed to it in the embed code.

Again recompilation was fast and this time I was presented with an MXML class - nice. Back inside FlashBuilder the problem count was only 5 - is that nice? The MXML code all validated fine but the application states were missing. I think what's happening here is that MXML gets turned into AS3 before it is compiled so when this is decompiled this code ends up being bundled into the Script block.

I have some sympathy for Eltima here as working out what is AS3 and what is MXML sounds like a nightmare. That said the resulting code is a far removed from the original source. There were also more than a few decompiler bugs in the script block - obvious stuff like function parameters with two datatypes.


What our tests show is that the AS3 and Flex support in this version is a little buggy and probably not reliable enough yet for 'real world' development. That said I still really like the Trillix Flash Decompiler. It's fast and the asset viewer is probably worth the price on it's own. Eltima have an RSS feed for product updates so I'd keep an eye out for the dot release.

 

About John Dalziel

John Dalziel is a founding member of FlashMagazine and regularly reports from community events in the UK. He has also written for Macromedia, New Riders, Actionscript.com and Ultrashock.com.

Next review:
FreeSpin3D CS4 Review

Previous review:
Review: Camtasia Studio 6

Get new stories first

Click to follow us on Twitter!

 

Comments

No comments for this page.

Submit a comment

Only registered members can comment. Click here to login or here to register