4 Replies Latest reply on Oct 5, 2007 6:48 AM by adam@blueapplestudio

    Compiler Errors: Classpath Problems

    adam@blueapplestudio Level 1
      I am working on a new project, and am getting a number of compiler errors, such as the ones below.

      The class or interface 'flash.geom.Matrix' could not be loaded.
      The class or interface 'flash.display.BitmapData' could not be loaded.
      The class or interface 'flash.geom.Point' could not be loaded.

      These errors are occurring since installing Sandy and adding a new classpath (Edit>Preferences>ActionScript>ActionScript 2.0 Settings). My classpaths are as follows.

      .
      $(LocalData)/Classes
      C:\Program Files\Adobe\Adobe Flash CS3\ASLibraries

      Have I messed up my standard Flash classpaths, or is this likely a problem specific to Sandy? Does the order of the addresses in the classpath list matter?

      Thanks for any assistance.
        • 1. Re: Compiler Errors: Classpath Problems
          clbeech Level 3
          yeah that doesn't seem quite right ... if you delete that path call in the prefs it should call to the correct path automatically (but save the string, just in case I'm way off :) seel if that'll fix it.
          • 2. Re: Compiler Errors: Classpath Problems
            adam@blueapplestudio Level 1
            Thanks for the fast response clbeech.

            I deleted all 3 paths and tested the movie.
            I got 1 compiler error (see below).
            The file 'toplevel.as', which is required for typechecking ActionScript 2.0, could not be found. Please make sure the directory '$(LocalData)/Classes' is listed in the global classpath of the ActionScript Preferences.

            Then, I added 1 address to the classpaths: “.”.
            I got 1 compiler error (see below).
            The file 'toplevel.as', which is required for typechecking ActionScript 2.0, could not be found. Please make sure the directory '$(LocalData)/Classes' is listed in the global classpath of the ActionScript Preferences.

            Next I added a second address to the classpaths: “$(LocalData)/Classes”.
            I got 4 compiler errors (see below).
            The class or interface 'Camera3D' could not be loaded.
            The class or interface 'Group' could not be loaded.
            The class or interface 'Group' could not be loaded.
            The class or interface 'Object3D' could not be loaded.

            Then I added the third address (this is the address to the Sandy files): “C:\Program Files\Adobe\Adobe Flash CS3\ASLibraries”.
            I got 34 compiler errors (below are the first two errors).
            The class or interface 'flash.geom.Matrix' could not be loaded.
            The class or interface 'flash.display.BitmapData' could not be loaded.


            The set of four errors (Camera3D, Group, etc.) are all Sandy related. I don’t understand why adding the last address to the classpath list creates the errors that it does. Shouldn’t it tell Flash where to find Camera3D, Group, etc? Any thoughts?
            • 3. Re: Compiler Errors: Classpath Problems
              mgoodes Level 1
              I can't tell you what the classpaths are ideally supposed to be but I can tell you the strategy I used for fixing this problem on the Mac.

              First reread all the error messages to find out how many root folders the compiler can't find. For example, in the last set of errors, you listed "flash.geom.Matrix" and "flash.display.BitmapData" which both have the same root folder "flash".

              Next do a search on your hard drive to find the folders that the compiler wants. A good way to do this is to do a search of the name of a more specific file such as "flash.geom.Matrix" and then navigate upwards through the folders to find the "flash" folder that contains all the relevant classes. Take special not of the folder WHICH CONTAINS this root folder, in this case the folder which contains the "flash" folder.

              Use the Flash AS3 preferences to add a global classpath to this containing folder. Repeat for any other Flash root folders that the compiler can't find.

              Repeat for your own classes. Remember to use the containing folder of your class in the classpath and not the actual folder. For example if you have a folder named "Camera3D" then point the classpath to the folder which contains "Camera3D".

              I've only tried this on my Mac but it worked well there so hopefully it will help.

              Mark
              • 4. Re: Compiler Errors: Classpath Problems
                adam@blueapplestudio Level 1
                I was publishing to Flash Player 6, and I needed to be publishing to at least 8. My classpaths are fine, I just didn't pay attention to player version. No errors anymore.

                Thanks for taking a look at this everyone.

                -Adam