Can you view the ActionScript of an FLA file that was saved in a newer version than your Flash program?

StackOverflow https://stackoverflow.com/questions/15446340

Question

I have an older version of Flash (Flash AS3 CS3, to be precise).

I am taking a college class in ActionScript coding. However, the version used by my school, as well as the source files for our textbook, are all saved in AS3 CS5 or later. I have tried not to let it get to me, but I am finding it difficult to work on my assignments at home.

Is there a way for me to view the Actionscript in the FLA files saved in CS5 or later, when all I have is Flash CS3?

If there is, then that would solve my problem quite nicely...

>> Edit

Since I might not have been clear, I am asking if there is a way for me to view the ActionScript of .FLA files saved in CS5 or later on my computer (which only has CS3). The assumption here is that I will no longer have access to a computer with CS5.

Please note that I don't particularly care about opening the whole file -- all I want is the ActionScript embedded in the Timeline.

Was it helpful?

Solution

At a quick glance, flash CS5 doesn't seem to be able to save in CS3 format; the lowest it can go is CS4.

However, it may be possible that most of the code inside an fla can be removed and saved in seperate .as files and then run inside a new CS3 fla which you could recreate at home. It is all very dependent on the what the contents of the fla are though and I am making some assumptions on what the contents of those flas are. But if it is just mostly code on the timeline with maybe a few simple movieclip symbols, it may be a possiblity.


Edit in response to the edit in the question

As far as I know, only flash can open fla files, but I discovered this somewhat recently, but never had a use for it. However it may be of some use for you: I have read/noticed that you can rename a flash CS5 fla in to a zip file and it will open/extract. Just change the extension from .fla to .zip then extract it.

Inside the contents you can dig around. The file you may be interested in the most is "DOMDocument.xml". Looking at it, it seems to describe the make up of the fla...including any actionscript on the frames.

For example, I made an empty fla, put some code in to frame 1, 2, and 4 that goes as follows:

on frame 1:

trace("This is frame 1, line 1");
trace("This is frame 1, line 2");

on frame 2:

trace("This is frame 2, line 1");
trace("This is frame 2, line 2");

on frame 4 (skipping frame 3):

trace("This is frame 4, line 1");
trace("This is frame 4, line 2");

Just some trace statements. Following what I just said and looking in the xml, in the timelines->layers->frames->Actionscript->script tag I can see my script:

<timelines>
          <DOMTimeline name="Scene 1" currentFrame="3">
               <layers>
                    <DOMLayer name="Layer 1" color="#4FFF4F" current="true" isSelected="true">
                         <frames>
                              <DOMFrame index="0" keyMode="9728">
                                   <Actionscript>
                                        <script><![CDATA[trace("This is frame 1, line 1");
trace("This is frame 1, line 2");]]></script>
                                   </Actionscript>
                                   <elements/>
                              </DOMFrame>
                              <DOMFrame index="1" keyMode="9728">
                                   <Actionscript>
                                        <script><![CDATA[trace("This is frame 2, line 1");
trace("This is frame 2, line 2");]]></script>
                                   </Actionscript>
                                   <elements/>
                              </DOMFrame>
                              <DOMFrame index="2" keyMode="9728">
                                   <elements/>
                              </DOMFrame>
                              <DOMFrame index="3" keyMode="9728">
                                   <Actionscript>
                                        <script><![CDATA[trace("This is frame 4, line 1");
trace("This is frame 4, line 2");
trace("This is frame 5, line 3");]]></script>
                                   </Actionscript>
                                   <elements/>
                              </DOMFrame>
                         </frames>
                    </DOMLayer>
               </layers>
          </DOMTimeline>
     </timelines>

The frame index seems to start from 0 and the script itself is wrapped between inside a CDATA tag.

I've also made a test fla where I had a simple movieclip item in my library. This results in a xml file that describes that item in the library directory when extracted. I did however get a "this zip file is corrupt" error when extracting...but it still appeared to extract fine.

You may have some work to piece together a more complex fla file doing what I said, but hopefully it is a start?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top