?
Solved

SWF Decompiler Not Restoring AS to FLA Files?

Posted on 2008-10-27
5
Medium Priority
?
286 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

764 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