Skip to main content
eeymry
Inspiring
June 24, 2013
Answered

Converting AS2 to AS3? Can it be done?

  • June 24, 2013
  • 1 reply
  • 26772 views

Hi,

First I'm not a Flash developer, I'm asking this question to help another group trouble shoot a problem. While I know this sounds dumb, I need an official answer to they can close this solution as some type of an option to solve this problem.

I was given several swfs from an elearning course in hopes that they could someone be put into Captivate and wrapped for an LMS.  Apparently the Flash developer isn't able to code these files for the LMS (weird yes, but not my task in this problem)  In looking at the swfs I was given they all say they were created using AS2 and of course, Captivate only supports AS3. 

Short of redoing the Flash files in AS3 is there any other way to take something written Flash using AS2 and output it to a swf that is AS3?

Thanks for indulging me with your time.

    This topic has been closed for replies.
    Correct answer fB3

    You cannot "Convert" an as2.swf to an as3.swf.

    You would need to have the original .fla file that created the as2.swf and manually export it to as3.

    The actionScript may need converting depending on several things. Hard to give an exact answer.

    An example of something needing conversion would be as something simple as a something referenced in a function may be doing something like...

    _parent.movieClipName._visible = true ;

    needs to be changed to

    parent.movieClipName.visible = true;

    because the underscore needed in certain name references was removed in AS3.

    There are too many things that could need changing to name them all.

    Another approach that "may" work as a creative workaround (hack) ...

    You could create a new as3.fla and export a new as3.swf that can actually

    load the original as2.swf file into the new as3.swf

    Then just load the new as3.swf into Captivate.

    Here is a link that will help and there is an example available to download

    http://www.kirupa.com/forum/showthread.php?295698-loading-an-AS2-swf-into-an-AS3-swf

    HTH

    1 reply

    fB3Correct answer
    Inspiring
    June 25, 2013

    You cannot "Convert" an as2.swf to an as3.swf.

    You would need to have the original .fla file that created the as2.swf and manually export it to as3.

    The actionScript may need converting depending on several things. Hard to give an exact answer.

    An example of something needing conversion would be as something simple as a something referenced in a function may be doing something like...

    _parent.movieClipName._visible = true ;

    needs to be changed to

    parent.movieClipName.visible = true;

    because the underscore needed in certain name references was removed in AS3.

    There are too many things that could need changing to name them all.

    Another approach that "may" work as a creative workaround (hack) ...

    You could create a new as3.fla and export a new as3.swf that can actually

    load the original as2.swf file into the new as3.swf

    Then just load the new as3.swf into Captivate.

    Here is a link that will help and there is an example available to download

    http://www.kirupa.com/forum/showthread.php?295698-loading-an-AS2-swf-into-an-AS3-swf

    HTH

    New Participant
    January 18, 2017

    WHY AND HOW ON EARTH would anyone create ActionScript 3 without the ability to (somewhat easily or reasonably) convert AS2 to AS3?     Could the Adobe team make things any more complicated?  

    Genius! 

    I am not developer, but I have spent years and a small fortune developing a website using Flash and AS2, so now I am trying to sort out how to make these files viewable on OSI using Adobe Animate.  

    Thanks for any info that help me understand the technical jargon.

    Joseph Labrecque
    Community Expert
    January 18, 2017

    AS1/AS2 and AS3 are completely different languages which rely on completely different virtual machines within Flash Player. You can convert AS2 to AS3 by hand, of course - but you need to source code - not the compiled SWF.