Create an Account!

ASV 3.12 Review

Search:
FlashDevils Community, Flash Developer to Flash Developer
 Recommend Us
 About FlashDevils Community
 Can i become a moderator?
 
Flash Community Register Flash Forum Control Panel Calendar Member List FAQ Search FLA Files

Other Reviews
ASV 3.12
Screenswift
FlashStudio PRO
Swift 3D v3

Review
ASV 3.12Sun 18 May 2003
Action Script Viewer 3.12



Website: http://buraks.com/asv/
Cost: $59.95 USD
Rating: 8.5/10




Introduction

Action Script Viewer (which I will be referring to as 'ASV' through out the review) is one of the most versatile Flash-related tools I have come across as a developer. The interface might seem fairly complicated, but it’s actually very well-organized and rather easy to use once you understand it. Besides, it’s outstanding at what it does. (Note: contrary to common belief, ASV will not make you an ActionScript pro!)

ASV is an SWF decompiler. What that means is, it ‘breaks down' SWF files and extracts the source code (and that doesn’t mean the FLA version.). Plus, it gives you general information about the movie itself, like what tags were used, what version the SWF file is, all the symbols/movieclips/bitmapped images/sound clips used, and more things that I’ll be discussing throughout this review. A demo version is available here.

This review is divided into 4 parts:

  1. Capabilites
  2. The Interface
  3. Case Studies
  4. Purchase Info
Note: Throughout the review (and in the 'Case Studies' section in particular), a number of fairly long sample scripts are provided. Feel free to just skim through them, as anything that needs to be pointed out will be mentioned in the analysis



I – Capabilities

As i mentioned earlier, ASV is outstanding at what it does. An impressive list of capabilities is available on Buraks’ site here. Yet, I will provide a summery of its key features and capabilites:

  • You can get your code back if you lose the source FLA to one of your SWFs.
  • You can have a look at code of any SWF you got, for learning purposes. (Mind you, it's not easy to learn by looking at code alone)
  • ASV can extract outlines of graphic symbols (no fills) as Flash MX actionscript (both as individual commands and as data) and as a .SVG file.
  • extracting all sounds as WAV/MP3.
  • extracting all bitmaps as JPG/PNG.
  • Works for SWF files generated by Flash 3, 4, 5 and MX.
  • Can open obfuscated/protected SFWs. Currently there is no obfuscator/protector available that can hide code or other resources from ASV (last updated February 21, 2003).
  • Can batch extract all library symbols as SWF files.
  • Can batch extract all layers as SWF files.
  • Video symbols can be saved as FLV files. (FLV files can be imported by Flash. Video symbols in SWF files do not contain any audio and are saved as such).
  • New 'Outline Mode' in Preview Window lets you preview while the graphic symbols are shown as outlines.
  • Now you can save all the extractable text in a SWF with Save All Text
    command as ANSI or UTF-8 to a single text file.
  • Now, the outlines of shape tweening symbols can also be extracted as
    actionscript/SVG (as start and end shapes).
  • With new Save Special command, now a SWF can be saved without sounds
    or
    with actions disabled. Also vector symbols can be saved as outlines or
    grayscale.
  • Now the preview snapshot bitmaps are saved as 24 bit even in 16 bit
    screen
    resolutions (Adobe Photoshop had problems with 16 bit valid bitmap
    files).
  • New preference Try Fixing Invalid Reserved Word Use which you might need very rarely.
  • Enhanced frame import for some 3rd party tool generated SWF files.
  • Enhanced JPG extraction for some 3rd party tool generated SWF files.
  • Fixed many bugs though none of them major and most of them rarely
    encountered in the decompiler engine.




II - The Interface

The interface isn’t complicated, but a tiny bit mind boggling at the first sight. There are 7 view tabs, Timeline, Frames, Library, Instance Names, Frame Labels, ActionScripts, and Special Tags. Most of the tabs are very inter-related with each other. Then there is what I decided to call the ‘Properties Panel’. And, finally, there is the toolbar buttons, most of which relate to ASV's environment, which is very customizable.

Below is a semi-interactive sample of the interface. You can navigate through the different tabs:

Note: In this example, the 'Frame Labels View' and the 'Spcial Tags' tabs are missing, due to the fact that the file i ran while taking these screenshots had no particular frame labels or special tags.)



a) Timeline View Tab:
Views the timeline as compiled in the SWF (and not the FLA). That is, each ‘depth’ would be on a different layer. Right-clicking a frame and selecting the ‘Trace in Frames’ traces the selected ‘frame’ in the ‘Frames View Tab’, which gives you yet more information about your selection (discussed below)

b) Frames View Tab:
This view, I think, is the most useful among the other six views, due to the ease of navigating through symbols (based on what frame they are on), and the information given about each symbol.

c) Library View Tab:
This view is very similar to Flash's own Movie Explorer.

d) Frame Labels View Tab:
This view enables you to browse trough frames with a labal designated to them, plus viewing all the actions assigned to them.

e) Instance Names View Tab:
Through this view you can browse symbols based on their Instance Names as opposed to their name in the Library. A symbol can appear multiple times under different Instance Names.

f) ActionScripts View Tab:
This tab views ActionScripts, whether they are assigned to a Frame, MovieClip, Button, etc...

g) Special Tags View Tab:
Certain tags embedded in the SWF are listed here.



III - Case Studies


a) Case Study 1

The following is an experiment of mine. I ran the file through Genable's ActionScript Obfuscator, an application that is supposed to protect SWF files from being reverse-engineered. Below are the script I made, the script extracted through ASV, and the obfuscated script.



Original script:
ActionScript:
/*          declaring variables and objects              */

Image = {width:192, height:192};
numOfBars = 12;
widthOfBar = Math.ceil(Image.width/numOfBars);
easing = 3;

/*         outlining the stage area          */

beginFill(0x0050FF, 10);
lineStyle(0, 0x0050FF);
lineTo(Stage.width-1, 0);
lineTo(Stage.width-1, Stage.height-1);
lineTo(0, Stage.height-1);
lineTo(0, 0);
endFill();

/*             declaring prototypes                  */

// easing effect:

MovieClip.prototype.moveMe = function(targetX, targetY, acc) {
        this._x += (targetX-this._x)/acc;
        this._y += (targetY-this._y)/acc;
};

// masking effect:

MovieClip.prototype.createMask = function(num, easing) {
        this._x = num*widthOfBar;
        this.beginFill(0xFF9900);
        this.lineTo(widthOfBar, 0);
        this.lineTo(widthOfBar, Image.height);
        this.lineTo(0, Image.height);
        this.lineTo(0, 0);
        this.endFill();
};

// create an empty movieclip, attach symbols from library, create
// masking effect and set the easing effect

for (i=0; i<numOfBars; i++) {
        createEmptyMovieClip("mc"+i, i);
        this["mc"+i].attachMovie("fmxlogo", "image", 0);
        this["mc"+i].easing = i;
        this["mc"+i].createEmptyMovieClip("mask", 1);
        this["mc"+i].mask.createMask(i);
        this["mc"+i].image.setMask(this["mc"+i].mask);
        this["mc"+i].onEnterFrame = function() {
                this.moveMe(_xmouse, _ymouse, this.easing*3+1);
        };
}

// switch images:

onMouseDown = function () {
        (myVar == "cfmxlogo") ? myVar="fmxlogo" : myVar="cfmxlogo";
        for (i=0; i<numOfBars; i++) {
                this["mc"+i].attachMovie(myVar, "image", 0);
                this["mc"+i].image.setMask(this["mc"+i].mask);
        }
};

Extracted script:
ActionScript:
Image = {width:192, height:192};
numOfBars = 12;
widthOfBar = Math.ceil(Image.width / numOfBars);
easing = 3;
beginFill(20735, 10);
lineStyle(0, 20735);
lineTo(Stage.width - 1, 0);
lineTo(Stage.width - 1, Stage.height - 1);
lineTo(0, Stage.height - 1);
lineTo(0, 0);
endFill();
MovieClip.prototype.moveMe = function  (targetX, targetY, acc) {
        this._x = this._x + ((targetX - this._x) / acc);
        this._y = this._y + ((targetY - this._y) / acc);
};
MovieClip.prototype.createMask = function  (num, easing) {
        this._x = num * widthOfBar;
        this.beginFill(16750848);
        this.lineTo(widthOfBar, 0);
        this.lineTo(widthOfBar, Image.height);
        this.lineTo(0, Image.height);
        this.lineTo(0, 0);
        this.endFill();
};
i = 0;
while (i < numOfBars) {
        createEmptyMovieClip("mc" + i, i);
        this["mc" + i].attachMovie("fmxlogo", "image", 0);
        this["mc" + i].easing = i;
        this["mc" + i].createEmptyMovieClip("mask", 1);
        this["mc" + i].mask.createMask(i);
        this["mc" + i].image.setMask(this["mc" + i].mask);
        this["mc" + i].onEnterFrame = function  () {
                this.moveMe(_xmouse, _ymouse, (this.easing * 3) + 1);
        };
        i++;
}
onMouseDown = function  () {
        (myVar == "cfmxlogo") ? ((myVar = "fmxlogo")) : ((myVar = "cfmxlogo"));
        i = 0;
        while (i < numOfBars) {
                this["mc" + i].attachMovie(myVar, "image", 0);
                this["mc" + i].image.setMask(this["mc" + i].mask);
                i++;
        }
};

Extracted script (obfuscated version):
ActionScript:
Image = {width:192, height:192};
numOfBars = 12;
widthOfBar = Math.ceil(Image.width / numOfBars);
easing = 3;
beginFill(20735, 10);
lineStyle(0, 20735);
lineTo(Stage.width - 1, 0);
lineTo(Stage.width - 1, Stage.height - 1);
lineTo(0, Stage.height - 1);
lineTo(0, 0);
endFill();
MovieClip.prototype.moveMe = function  (1, 2, 3) {
        this._x = this._x + ((1 - this._x) / 3);
        this._y = this._y + ((2 - this._y) / 3);
};
MovieClip.prototype.createMask = function  (1, 2) {
        this._x = 1 * widthOfBar;
        this.beginFill(16750848);
        this.lineTo(widthOfBar, 0);
        this.lineTo(widthOfBar, Image.height);
        this.lineTo(0, Image.height);
        this.lineTo(0, 0);
        this.endFill();
};
i = 0;
while (i < numOfBars) {
        createEmptyMovieClip("mc" + i, i);
        this["mc" + i].attachMovie("fmxlogo", "image", 0);
        this["mc" + i].easing = i;
        this["mc" + i].createEmptyMovieClip("mask", 1);
        this["mc" + i].mask.createMask(i);
        this["mc" + i].image.setMask(this["mc" + i].mask);
        this["mc" + i].onEnterFrame = function  () {
                this.moveMe(_xmouse, _ymouse, (this.easing * 3) + 1);
        };
        i++;
}
onMouseDown = function  () {
        (myVar == "cfmxlogo") ? ((myVar = "fmxlogo")) : ((myVar = "cfmxlogo"));
        i = 0;
        while (i < numOfBars) {
                this["mc" + i].attachMovie(myVar, "image", 0);
                this["mc" + i].image.setMask(this["mc" + i].mask);
                i++;
        }
};

Analysis:

Obviously, there are a few differences between the original and the extracted script. Yet, as most of modifications were in the way the script is formatted, the functionality of the extracted script remains the same. The first thing I noticed was that all for-loops were converted to while-loops. In addition, all the commenting was erased out. There are other minor differences. The code gets automatically reformatted, sometimes resulting in unneeded, yet unharmful characters (see below).
ActionScript:
// The line:
(myVar == "cfmxlogo") ? myVar="fmxlogo" : myVar="cfmxlogo";
// becomes:
(myVar == "cfmxlogo") ? ((myVar = "fmxlogo")) : ((myVar = "cfmxlogo"));

The results I got out of the obfuscated version show the huge improvement that has been made between versions 3.03 and 3.1 (see this link). The script was identical with the non-obfuscated one, in exception of the fact that the variables in prototypes ‘moveMe’ and ‘createMask’ were changed to1, 2 and 3 (which I think isn’t bad at all, compared to the sample provided at the link above).



a) Case Study 2

This case study is on the feature that impressed me the most. ASV 3.12 can export the outlines of anyGraphic symbols containing vectorart as (a) ActionScript, (b) ActionScript data (which can be used with Peter Halll's ASVdrawing class), and (c) as SVG data. These can come handy sometimes.

The vector drawing used in this case study was provided by Angela Taylor (a.k.a kitiara), thanks kit!



Exported as ActionScript, the image's outline was made into a 1967-line long script: drawingAsActionScript.as

The data array exported by ASV through the 'Export as ActionScript Data' may seem pretty useless at first. With Peter Hall's ASVdrawing class though, it's useful, and some nice effects can be acheived with it. To use it though, you need to download the ASVdrawing class, and you might want to read the simple 'tutorial' provided on this page.
I modifided the 'draw' prototype and came up with my own 'handDraw' prototype that can be used with Peter Hall's class to achieve this effect:



And finally, the SVG version of the drawing can be seen here (requires plug-in)


Analysis:

The improvements in each release of ASV are noticable. The features discussed in this case study are native to ASV 3.12. Some cool effects can be done with the 'Export as ActionScript' feature. If you have some illustration done in flash that need to be exported as SVG, ASV can be a time-saver. These features, and others, set ASV apart from the other free SWF decompilers available.



IV - Purchase Info

ActionScript Viewer can be purchased online through Buraks site for $59.95 USD. Trying the demo version is reccomended although it's quite outdated (ASV 3.0)

Minor updates (3.x) are free



Summary

After experimenting with ASV for a long while, I see it as a very interesting tool. It can be a life-saver in many situations. ASV is easy to use, althougt getting to some of the advanced features is not. In addition, the documentation provided with it is very comprehensive.

Although getting a proper FLA file out of an SWF is technically impossible, you can extract pretty much all the components and actions out of your SWF files.

Two interesting little tools are available for download with the purchase of ASV; ASV Projector Creator and ASV IE Cache SWF Browser. Both the tools can be downloaded free of charge.

Again, I would reccomend browsing through Buraks website, which has a great deal of information on the application and it's usage.

Special note on conditions of use
You can only use ASV on SWF files that you have the right to use ASV on. Burak KALAYCI or Manitu Group will not be responsible for your actions.
Total views: 16867 times Posted by: TheDutch


Latest Threads
Freemovietag
Global Medical Shop
AS2 Custom Load Screen Issue
Flash Masking Text Entry
Please review: GAMERIGHTNOW.COM - our game site

< FlashDevils - Terms of use >

Copyright, FlashDevils Community, 2002 -
Flash Archive