2 Replies Latest reply on Apr 2, 2017 12:54 PM by IronAsaf

    Converting an AS3 project to a HTML project

    IronAsaf Level 1

      Hey there,

       

      With the sudden but weird fall of flash itself I need to start converting some of my projects to HTML from AS3. Now there is the option in animate under command but it will only convert the animations properly not the code. I tested it out. Made a simple stop() and a game where when you click a textbox updates adding a point. I did it both once in the actions and once in an external(but connected) as3 file.

      Both did not work, so my question is such - Is there an efficient way to convert a AS3-FLA project to a full HTML-js one?

      I know it isnt possible strictly but are there guidelines besides the following -

      Convert your ActionScript code to HTML5

       

      Any guideline or workaround is blessed

        • 1. Re: Converting an AS3 project to a HTML project
          Colin Holgate MVP & Adobe Community Professional

          Most people are using a browser with Flash Player built in, and most other people have Flash Player added as a plugin. So Flash is still around. AS3 is also used for making all AIR apps.

           

          It's only mobile web browsing that needs HTML5 instead of Flash, so if it's important to convert your swfs to work in mobile browsers you would need to do the code changes by hand.

           

          The convert option does leave all your timeline code in place, so you could uncomment it and convert each line to be compatible with CreateJS Javascript, using that handy guide you gave the link to. That doesn't help if you have used a lot of external ActionScript classes. I haven't yet had to convert that kind of project, all the HTML5 Canvas things I have done were from scratch. But if I did, the approach I would take would be to copy the external code into frame 1 of the symbol that the code was attached to.

           

          Many of the lines could be deleted, like the package details, any import lines, any variable types. You then would convert what was left to work with CreateJS syntax.

           

          There are bound to be some things that AS3 can do that don't exist exactly the same in Javascript. For those you'll just have to program it in a different way.

          • 2. Re: Converting an AS3 project to a HTML project
            IronAsaf Level 1

            What I do with flash is basically create ELearning packages for courses. Now I don't quite use web but I do have a moodle platform that would work better (due to scorm) with html. It still sounds like the only way is to redo your work which is a shame but I will take what you said about placing the referring lines to the symbol its attached to.