Solved

SWF Decompiler Not Restoring AS to FLA Files?

Posted on 2008-10-27
5
282 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

691 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