This site is now just an archive over the rise and fall of Flash. The domain flashmagazine.com is available for sale
Login | Register
ASV to the rescue!

ASV to the rescue!

ASV is short for Action Script Viewer, a utility program created by Burak Kalayci and his Manitu Group. ASV has come a long way from being a hacker tool to something every serious Flash developer will need from time to time. Some weeks ago, ASV saved me 5 hours coding in just 5 minutes!

From being viewed as purely a hacker tool, Action Script Viewer (ASV) is more and more getting the praise it deserves. There are programs doing the same things, but ASV was the first and is still the best. ASV is a SWF Decompiler. It will open any SWF file and show all of its contents including scripts, timeline, symbols, sounds and more.

Decompiling
Many Flashers dislike decompilers such as ASV since they allow people to peek at their code. If you work really hard creating a cool game or an application and a script-kiddie with virtually no skills use ASV to hack your file and then put it up on FlashKit as a free source code, you have the right to be angry. It is however the kid you should be angry with, not the tool he used. Its the one using the tool that is doing something wrong and to quote something similar "Guns don't kill people. People kill people". One might object that the availability of guns (or decompilers) increase the chance, but that is a different discussion.

The SWF format is an openly published format, owned and controlled by Macromedia. With very few restrictions, virtually anyone can make tools that either open, export or import SWF files. All web browsers have a "view script/code" option that will let you see the HTML code for any given page. Peeking at Actionscript is almost as easy if you are using a decompiler tool. Due to this, you should know that your Actionscript code are just as insecure as HTML and JavaScript.

Never put passwords or anything sensitive inside your scripts. Anything in a SWF file should be considered public knowledge. SWFs are just as secure as any HTML page. If you can make a secure HTML page, you can make a secure SWF file. It's that easy (and hard). Also keep this in mind: opening other peoples SWF files and using / posting this code is the same as stealing! If someone steals your code using a decompiler, you may take legal actions against this person. Stealing is stealing, no matter what.

What ASV offers
Now that we've discussed the legal issues, it's time to take a look at ASV and what it can do. If you have ever lost the FLA file for a project, you often learn a lot about backing up your files, but you still have to do the project from scratch. Sitting there doing the same things all over really feels unnecessary!

Using ASV, you can extract any resource from a SWF file. Sound files may be extracted to Wav/MP3, Flash symbols (buttons, graphic and movieclips) to SWF, images to JPEG/PNG, Actionscript to AS-files and video symbols as FLV. This can be done in one operation or object by object. In the Publish panel in Flash, you have an option to turn on protection. This will not prevent decompilers such as ASV from opening the file, but it will effectively prevent you from opening the swiff in Flash. ASV will let you browse all the timelines and resources in any SWF file.

image

How ASV saved me
I am a fulltime programmer at the company Netron in Oslo. On my spare time, I run Flashmagazine (with the help of some good friends) and write a Norwegian book series on Flash. When it was time to create the accompanying CD ROM for the second book, I got a small shock: my backup was corrupt! All the files on the DVD that I backed up to were zero Kb. Crisis! The accompanying CD ROM consisted of additional information stored as XML and a Flash app that would present this once the user inserted the CD ROM. The source file for the app was gone... I looked everywhere, but I had no other backup.

I had thought this to be so easy and now I had to do it all again - by the next morning. Then I remembered: ASV 4 just came out and with it, an experimental feature called Export Rebuild Data. Using the new Flash extensibility layer (JSFL), ASV could export a JSFL file plus the resources of any SWF file. I grabbed the CD ROM from the previous book, copied the SWF to my harddrive and opened ASV. I made the export and clicked the JSFL file. Flash opened and "voila" - there was my project, fully reconstructed! It was nothing short of amazing.

The Export Rebuild Data function will work for all but the most complex files. I made some tests and in most cases, it'll fully reconstruct the FLA file for you. All symbols will loose their names, but all the content and scripts will be there. If you have been in the business for some time, you may have experienced that an old client returns and want you to tweak the menu you did 3-4 years ago. Now where was that backup...? ASV can really save you in situations like this. You may dislike decompilers, but the first time you need the rebuild-functionality you'll love ASV!

New features of ASV 4
Apart from full support for SWF 7 and Actionscript 2, the latest version of ASV lets you save classes to individual files and extract font symbols as TTF files. Using the ASV Tools, you can browse files in the IE cache, create and compress projector files, convert and extract audio/video from FLV files.

A neat thing that is included with the latest version is a JSFL command that will rearrange you library according to use so that unused symbols are placed in one folder, scene symbols in a scene folder, sounds in a sound folder and subgraphics for symbols are placed in subfolders. A great timesaver that is even available as a free download.
Read more at the ASV homepage

 

About Jens C Brynildsen

Jens has been working with Flash since version 3 came out. Since then, he's been an active member of the Flash community. He's created more than a hundred Flash games (thus the name of his blog) but he also creates web/standalone applications, does workshops and other consulting. He loves playing with new technology and he is convinced that the moment you stop learning you die (creatively speaking). Jens is also the Editor of this website.

Next review:
Flash 8 revealed

Previous review:
Review: iceProjector 1.5

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