adobe pro cc (AS3) not recognizing box2d classpath

64 views Asked by At

I've tried to connect a box2d classpath I have to adobe pro cc via a source path in the actionscipt settings. I get a warning saying "A definition for the document class could not be found in the classpath, so one will be automatically generated in the SWF file upon export." When I do this the code still does not recognize the box2d commands. Any help is appreciated, thanks so much!

Edit: So I have now replaced the primary source folder thanks to Cadin's observation and the Box2d library commands are being recognized, however, I get several errors saying: "Type was not found or was not a compile-time constant: b2World." "Call to a possibly undefined method b2AABB." and "Definition Box2D.Collision:b2AABB could not be found."

I am extremely stuck and don't know what to do. I am fairly well versed with flashdevelop. But it has been a while since I've worked with flash pro. Thanks so much!

1

There are 1 answers

1
Cadin On

It sounds like the error is complaining about your Document Class, not Box2D.

When you added the source path to Box2D, did you add a new path, or replace the default one?

It's easy to accidentally replace the default path and get all kinds of class linking weirdness. Check the source path settings and make sure you still have a listing for "." That tells Flash to look in the current directory (where the FLA is) for source files. If your document class is in that directory, Flash won't find it without that source path.