4

Evening, I have a SWF file (Flash file) that uses ActionScript 2 code.

What I like to do is convert it to a SWF file that uses Actionscript 3 code.

Note that I say "uses", not contains. The SWF may contain AS2 code still even though it will appear from the outisde that it contains AS3 code. This is because the code will never be processed, I just need to make the AS2 SWF file into a AS3 SWF file.

The ActionScript can be removed altogether from the resulting SWF file. That doesn't matter.

There is a way to do this, just a question of how.

How?

If anyone know how I should go about doing this please say. Perhaps you know of an already-existing application that removes all ActionScript code from a SWF file?

Just to be perfectly clear: I do not wish to convert the AS2 code into AS3 code. Although if that somehow is magically possible I wouldn't complain of course.

It's the SWF that must change to be defined as a AS3 SWF instead of a AS2 SWF file.

Mike
  • 301
  • 1
  • 4
  • 5

1 Answers1

1

So you don't have the source code, do you? I've never tried this myself, but I guess the code could be stripped with Flasm, and then convert the SWF movie by hex edition the header values that define the ActionScript and Flash Player versions.

Aside from code tags, and a lot of code bytecode, I don't know right now of any AS1 & 2 tag that isn't compatible with AVM2. Could be wrong tho.

Neverbirth
  • 1,044
  • 8
  • 20
  • I have my source code, but I'm running into this same problem. I have thousands of facial animations for a web-based tutoring system, and after upgrading the main system to AS3, they will no longer play. It takes too long to open every FLA file > publish settings > target player version > ActionScript version > save in new FLA format, export movie again, etc. Only the last frame has code that calls "stop" and sets a variable in "_level0". The perfect solution would be bulk conversion of the SWF files to AS3 SWF files, with the obsolete code in the last frame stripped off. – Triynko Sep 05 '12 at 20:36
  • I guess you could make some JSFL to bulk convert all the FLA files. I don't know if "_level0" is allowed in AS3. – Neverbirth Sep 11 '12 at 09:12