1 Reply Latest reply on Sep 20, 2011 11:10 PM by Anirudh Sasikumar

    Problem referencing ActionScript classes in Flash Builder

    miquael Level 1

      I've just started a new ActionScript project in Flash Builder, which references a large code base I've been working on for years.  Overall, the app runs in test mode with no errors, however, all I get is a blank screen.  So to figure out what is going on, I've started placing trace commands into my code.  While the first few initial traces are working in the primary project classes (which are in the directory of my primary project folder), traces placed into the code base are not showing up.  The code base is referenced as a source path in the project preferences (and I can access it in the Package Explorer).  It's funny, because it's like the project appears to be referencing the code base, except that it appears that it's not the code base directory I think it's referencing--but I have checked and double checked that I'm looking at the same directory for the code base, and it is correct.

       

      For example, in one of the primary project classes (a package):

      world = new Space({app:this});

      this.addChild(world);

       

      trace (">>> world = " + world);

       

      "Space" is a class within the external source path direcory.  This trace shows that "world" is indeed intantiated as "[object Space]".  So I know that the Space class is being accessed and instantiated with no errors.

       

      Yet if I then put a trace into the Space class:

      public function Space(data:Object) {

             trace (">>> Space: " + data);
      }

       

      I get nothing. No trace, no error. Nothing (except the same traces I got before).

       

      I then even tried putting a new test function into Space:

      public function test() {

              trace ("Space test");

      }

       

      And then call it from the primary project class:

      world = new Space({app:this});

      this.addChild(world);

       

      world.test();

       

      ... and then get the error:

       

      "-1061: Call to a possibly undefined method test through a reference with static type TorqueNDX.vision_logic:Space."

       

      ... as if I had not even put the test() function in there!  Or as if the app is referencing a different copy of the Space class.  But again, I have checked and double checked the source path, and am editing the Space class thru the project Package Explorer itself. 

       

      What is going on here ??? 

       

      Anyone have any insights?