6 Replies Latest reply on Mar 28, 2017 5:24 AM by Robert Mc Dowell

    Converting AS2 to AS3?  Can it be done?

    eeymry Level 1

      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.

        • 1. Re: Converting AS2 to AS3?  Can it be done?
          fB3 Level 2

          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 person found this helpful
          • 2. Re: Converting AS2 to AS3?  Can it be done?
            Noreen Mulliken Level 1

            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.

            • 3. Re: Converting AS2 to AS3?  Can it be done?
              JosephLabrecque Adobe Community Professional

              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.

              1 person found this helpful
              • 4. Re: Converting AS2 to AS3?  Can it be done?
                Robert Mc Dowell Level 3

                sure, just convert 4 millions lines of code to have the same result and even worse with as3. and also

                give to you 3 years to convert it when you work on such projects

                • 5. Re: Converting AS2 to AS3?  Can it be done?
                  ClayUUID Adobe Community Professional

                  https://forums.adobe.com/people/Noreen+Mulliken  wrote


                  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.

                  I'm going to assume you meant iOS, not the Office of Special Investigations.

                   

                  If you're targeting iOS, you need to convert to a Canvas document, not an AS3 document. Canvas uses JavaScript, not ActionScript. The good news is that this is even harder than converting AS2 to AS3, because Canvas mode is much more limited than AS2/AS3.

                  • 6. Re: Converting AS2 to AS3?  Can it be done?
                    Robert Mc Dowell Level 3

                    there is a more elegant way to port an entire as2 website

                    on smartphones and tablets, use adobe AIR with the viewport pointing to your website.

                    Also consider some very interesting open source projects like Shumway mozilla

                    that will allow any browser to interpret an SWF correctly without any plugin, like HTML or XML files.