8 Replies Latest reply on Jul 4, 2008 5:01 AM by Gaius Coffey

    Code tidy changes meaning of code

    Gaius Coffey Level 2
      Hi,
      I am finding major problems with my installation of Flash CS3 whenever I use the "Code Tidy" feature. I suspect it is due to a corrupt DLL or something as others do not seem to experience the same problem, but I have not been able to find any references anywhere, I have reinstalled more than once and don't seem to be able to get any response from anybody in Adobe itself.

      Before I tidy, I might have:

      var avalue:Number = 20;
      var bvalue:Number = 4;
      var cvalue:Number = (avalue+bvalue) / 2;
      // cvalue = 24 / 2 = 12

      After tidy, I have instead:

      var avalue:Number = 20;
      var bvalue:Number = 4;
      var cvalue:Number = avalue + bvalue / 2;
      // cvalue = 20 + 4 / 2 = 20 + 2 = 22

      As you can see, this is a MASSIVE difference and very very dangerous - irritatingly, it can also provoke endless loops in unexpected places because I occasionally use formulae to set the initiation and termination values.

      PLEASE CAN SOMEBODY POINT ME TO A RESOURCE TO HELP ME FIX THIS!

      Thanks,
      Gaius
      FYI, I have a pretty standard windows XP machine with plenty of memory.
        • 1. Re: Code tidy changes meaning of code
          Gaius Coffey Level 2
          Another real world example:

          The original:
          var d:Date = new Date();
          var timestr:String = d.getHours()+":"+("00"+d.getMinutes()).substr(-2);
          // timestr has minutes formatted with leading 0
          // eg: at 1 minute past mid-day, timestr will read 12:01

          After pressing code-tidy:

          var d:Date = new Date();
          var timestr:String = d.getHours()+":"+"00"+d.getMinutes().substr(-2);
          // timestr has "00" prepended to minutes
          // eg: at one minute past midday, timestr will be 12:001
          • 2. Re: Code tidy changes meaning of code
            Gaius Coffey Level 2
            (Although actually, it strips the () for new Date(); to new Date ; also)
            • 4. Re: Code tidy changes meaning of code
              Level 7
              What the heck is 'code tidy' anyway? I tried your examples and auto-format
              does not remove any parenthesis...

              --
              Dave -
              www.offroadfire.com
              Head Developer
              http://www.blurredistinction.com
              Adobe Community Expert
              http://www.adobe.com/communities/experts/


              • 5. Re: Code tidy changes meaning of code
                Gaius Coffey Level 2
                Hi Dave,
                Code tidy is the "Auto format" button when you are in the actionscript window. And, as I say in the post, I think this is specific to my machine - a corrupt installation, perhaps - rather than a general bug in Flash. However, I can replicate those problems 100% of the time on my machine.

                I have tried all the channels that are available to me (that I know of) so I am getting kinda desperate. If it's any help, my Flash CS3 is quite buggy in any case and will crash out horribly about twice a day. So far, I have uninstalled all previous versions of flash, uninstalled all previous plugins, re-downloaded and reinstalled CS3 Pro and STILL get the exact same dangerously buggy behaviour.

                Basically, I want to know if this has occurred anywhere else, if there is a likely culprit in terms of corrupt dlls and how to fix my installation.


                Gaius
                • 7. Re: Code tidy changes meaning of code
                  Walter Elias Level 2
                  I'm not sure how anyone can help. I copied your code, put it into a new Flash file, used Auto Format, and nothing changed. If Flash is crashing so much on your machine, I'd venture to guess the OS or Registry is slightly screwed up. It isn't necessarily a Flash DLL problem. I think you'll have a hard time finding help for your specific registry issues on this forum. Taking a desperate chance you might try a general tech help forum like fixya.com
                  • 8. Re: Code tidy changes meaning of code
                    Gaius Coffey Level 2
                    Well, yes, I think you're right about the problem, but I would have thought an Adobe Flash forum would be more likely to have the knowledge about what Adobe Flash might rely on and what might need to be fixed!

                    FYI, I have (on your recommendation) done a search at Fixya.com and found ... absolutely nothing that could be relevant. There are only references to Flash plugin problems.

                    ANY pointers on how to sort this would be useful as I am starting to run out of options - I have submitted bug reports, support requests and so on via the Adobe website and received nothing. I have searched Adobe technotes and I have tried (and failed) even to find a number where I can get assistance from an engineer in Adobe.

                    I suspect that a total clean out of my registry for Flash related items would be a good start, and I would have thought Adobe have technotes on this, but again, I cannot find them.

                    Sorry if I'm being clueless, but I am a freelancer and dependent on Flash CS3 for my paid work. I need to find a solution and would even pay for it if I knew it would fix it.

                    The thing is, I don't know where to look...