SWF to FLA can it be done?
The big question, how can I convert an .SWF
file back to an .FLA file? Well there is no easy answer, a
lot of factors need to be considered when attempting this
complex and time consuming task. This tutorial will outline
a number of ways to ease the task and cut the time done as
much as possible.
|Step (1) - Vector Graphics
, Basic movie structure
|Importing an swf file into the
flash editor well give you a limited but very important set
of information. It will give you all the vector graphics and
a basic movie structure. Although movie objects , action script
and sounds are removed and not imported.
The main aim is to get as much of the vector graphics information
from the .SWF file. So you really want all the movie objects
to be imported individually to get all the graphics detail.
To do this you can use a program to extract the movie objects
and save them as new individual SwF files. Livetronix currently
doesn't have a tool for this but there are a few out there
that can do it very well for you.
Now that you have all the vector graphics info you now need
to fill in the gaps - Sounds, Images and
the most complex, Action script
Step (2) - Images and Sounds
SWF Scanner is the key to constructing your .FLA from an
.SWF file. It's easy to see how to get the sounds and images
out of the .SWF file and add them into the new fla file.
Just extract each one, and add it into the project. Information
like frame numbers can help in the placement of both into
the new movie. But most sounds and images and defined as in
frame 0, though there don't always get displayed in frame
(V2.5 and below - ADPCM encoded sounds can not be extract)
** important note - in Flash the first frame
is frame 1, in .SWF the first frame is frame 0
|Step (3) - Action
|Action script is the most complex
and important part of the SwF file. Information such as the
frame number and frame label are given when extracted with SwF
scanner. These should be used to place them into the correct
frames of the new fla file
You can have the script translated into SwF version 4 or
5 , you should use the appropriate version for the target
Translating the action script is a complex process and it
will not always be perfect. But it all most all cases the
resulting script will give the same result as the original
script. An example of this is the script given below. As you
can see the script is different, but the over all result is
Original Script Interpreted Script
if( var1 < 1023 ) if( not ( var1 >
1023 ) )
You need to have a good knowledge of action script to be
able to take full advantage of the action script extraction
features. Novices should be warned that simply copying and
pasting the script into a
new fla project will not always work, you may need to make
some changes to the syntax of the script.
An Example of possible changes that may be needed to be made
to the script to make it have valid syntax is, sometimes "
characters are inserted when they are not needed. ( This is
being worked on and more accurate translations are in development,
the engine is being constantly improved )
Step (4) - Sprites\Movie Objects
A movie object is the same as a symbol that has a movie behavior
set to it. These are also called sprites. SwF scanner displays
each of the useful movie objects in it's objects list as shown
For each of these you should create a new symbol in your
project, and add the action script , sounds, and images in
each using the frame numbers as a guide.
Step (5) - Buttons
Button Objects are much like Movie Objects. You can select
a button object from the object list and the buttons action
script will be displayed. This works exactly like any other
action script that can be viewed and extracted.
You can copy the script and add it into new button object
in the new fla file.
This brief tutorial will give you a good start in creating
a new fla file from your SwF file. As this is a very complex
process it is very hard to take every variation into account
and give an accurate solution to it's extraction. But you
should now be able to get starting and have a head start in
getting the best results possible.
Jared Allen - Livetronix
* The information in this
document and this site must be used within the user license
agreement. Copyright should be acknowledged in all cases and
ownership of the SwF files being "scanned" should
|** The .FLA and .SWF icon belong