• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Problem referencing ActionScript classes in Flash Builder

Contributor ,
Sep 18, 2011 Sep 18, 2011

Copy link to clipboard

Copied

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? 

Views

446

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 20, 2011 Sep 20, 2011

Copy link to clipboard

Copied

LATEST

This is a guess,but does class TorqueNDX.vision_logic.Space exist in a library (SWC) in your build path?

If you move it from a linked source path to the proper source directory, then your class will override what's there in a SWC.

-Anirudh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines