Solved

SWF Decompiler Not Restoring AS to FLA Files?

Posted on 2008-10-27
5
268 Views
Last Modified: 2013-11-11
I've inherrited a Flash Web development project, and I'm on Flash 9 (CS3). The original developer is no longer on speaking terms with the client (what a mess!), but his SWF files are, of course, available to me.

I'm using a decompiler app called Sothink Flash Decompiler, which converts SWF files into FLA files and extracts all resources (ActionScript, images, fonts, etc.). It has extracted FLA files from the SWF files, but there are some problems.

There's one thing in particular that confuses me. When I tell the decompiler app to extract all SWF file resources, it gives me many pages of ActionScript in various folder hierarchies. But there is not a single line of ActionScript in the resulting FLA files. Does this make sense?

What am I to conclude from this? Does it mean that the decompiler is not restoring the ActionScript to the FLA files, or is it actually doing so in a way that results in something other than lines of code?

Below is just one example of a page of ActionScript extracted from an SWF file, which the decompiler app placed in a file called background_image_14.as, in a folder that it created called main_fla (the original file was called main.swf). It appears nowhere in the resulting FLA file. Thanks.
package main_fla

{

    import flash.display.*;
 

    dynamic public class background_image_14 extends MovieClip

    {

        public var bg:MovieClip;
 

        public function background_image_14()

        {

            addFrameScript(0, frame1, 1, frame2, 79, frame80, 159, frame160);

            return;

        }

        function frame160()

        {

            stop();

            return;

        }

        function frame80()

        {

            stop();

            return;

        }

        function frame1()

        {

            stop();

            return;

        }

        function frame2()

        {

            play();

            return;

        }

    }

}

Open in new window

0
Comment
Question by:Jonathan Greenberg
  • 3
  • 2
5 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 22816586
Could it be the case where it is using the Document class???
http://livedocs.adobe.com/flash/9.0/UsingFlash/help.html?content=WS026C9121-F7D4-496d-94C8-368BF6938149.html

CyanBlue
0
 

Author Comment

by:Jonathan Greenberg
ID: 22816864
CyanBlue, thanks for that. I didn't know about the Document Class.

Yes, there is one ActionScript file that the Document Class text box in the Property inspector is pointing to. But that's only one of 32 pages of ActionScript. I don't see any instructions in the page to import any of the other pages. So what purpose do the rest of them serve?

For example, there are two ActionScript pages -- Reflector.as and ReflectorRate.as -- in a path relative to the FLA file of com/afcomponents/common/display/reflection/. I'm assuming that these files refer to components, from a company called AFComponents, that I'll probably need to buy for the FLA file to work correctly. But do you know of a logical reason as to why these ActionScript files are there but not in the FLA file anywhere? Is there some place in the FLA file from which it is importing them?
0
 

Author Comment

by:Jonathan Greenberg
ID: 22818655
I've figured it out. The additional ActionScript files are all linked to the various library items.

What would they be called, object definition files? And do I need to keep these files to continue using the library items, or were they only needed to recreate the library items when opening the new FLA file?

Thanks for your help.
0
 

Author Closing Comment

by:Jonathan Greenberg
ID: 31510508
Thanks!
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 22827594
Those are class files that are associated with individual library items...  It's like a file that contains its behaviors which gets initialized as soon as you lay library item onto the stage...  
Yes, you do need to keep them in the given directory structure as is, otherwise, Flash won't be able to find them when creating a SWF file...

CyanBlue
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now