2 Replies Latest reply on Sep 5, 2014 12:52 PM by Ned Murphy

    Format code Adobe Flash CC 2014 Broken

    Digital Production Level 1

      I just upgraded from Adobe Flash CS6 to Adobe Flash CC 2014 and I noticed that Adobe changed how the "Format Code" command formats a Greensock code line (arrays). Does anyone have a workaround or solution?

       

      The way CS6 formated a line of Greensock code (my preferred way):

      TweenLite.to(mc, 1.5, {x:100, y:200, rotation: 360, ease:Expo.easeInOut, delay:1});

       

      How it formats now in CC 2014:

      TweenLite.to(mc, 1.5,

      {

          x: 100,

          y: 200,

          rotation: 360,

          ease: Expo.easeInOut,

          delay: 1

      });

        • 1. Re: Format code Adobe Flash CC 2014 Broken
          Ned Murphy Adobe Community Professional & MVP

          Usually the easiest fix for something that CC does differently is to revert to using the version that you are comfortable with... CS6 in this case.  Personally, I manage all the formatting of my code and don't rely on any built-in tool for it.  Built-in coding stuff in my opinion is always a mess - as evidenced by any html page ever produced by MS Word.

           

          I am not sure why you mention arrays since the formating only appears to have affected the Object that is defined as one of the tween's arguments.  The way it is formatted makes it easier to read the properties of the Object. I wouldn't say it is broken, it is just done the way someone who writes the program decided they like it to be shown.

          1 person found this helpful
          • 2. Re: Format code Adobe Flash CC 2014 Broken
            Ned Murphy Adobe Community Professional & MVP

            One thing you might check would be to go into the Preferences (Edit -> Preferences -> Auto Format) and see if there is anything there that defines the options for breaking down code for Objects.  Even CS6 has options to designate how to deal with curly braces and other coding elements.

            1 person found this helpful