2 Replies Latest reply on Dec 12, 2011 10:38 AM by kglad

    AS3 Auto Format not recognizing comments


      Something is corrupt with my Flash Professional CS5 Actionscript Auto format:


      Comments within a block, such as ' // ' or block comments ' /* ... */ ' are tripping up the Auto Formattor, which returns this error: ' Error with autoformat near line: }  '.


      Comments before package block don't cause an error.


      When I remove comments within package block, Auto format works correctly.


      How can I fix my Flash CS3 ActionScript editor Auto format?

        • 1. Re: AS3 Auto Format not recognizing comments
          Googolhz Level 1

          Found a workaround:


          If an empty comment is put after the closing package brace, then Auto format no onger chokes on comments.

          1 person found this helpful
          • 2. Re: AS3 Auto Format not recognizing comments
            kglad Adobe Community Professional & MVP

            the problem you're seeing is the least of the known problems with auto-formatter.  the worst is the auto-formatter change change well-written code to be mal-formed code.


            so, while i don't think you can fix your auto formatter, what you can do is copy chunks of code to a new fla or as file and auto-format that chunk.


            then check that it's been formatted correctly and nothing essential has been changed.  (ie, at least, check for errors.)  if everything looks ok, replace the unformatted chunk in your original file with the formatted chunk.


            that's the wisest way to use auto-formatter.   it's also good to know and use the undo so you can always undo an auto-format botch.