Why Box2DFlashAS3 2.1a example PhysTest.fla compiler errors

Error info:
D:\Box2DFlashAS3 2.1a\Source\Box2D\Dynamics\b2World.as, Line 871 1046: Type was not found or was not a compile-time constant: b2Fixture.

I use Adobe Flash Professional CS5 IDE to compile the files, and get this unexpected errors.

My Flash Player version:10,2,154,25 installed

so anyone could help me about it? Thanks!
hey, guys! at least let me know whether you have met this problem?
I ran in to that problem but I can't remember anymore what it was..

have you imported all the necessary classes?

Code:
import Box2D.Dynamics.b2Fixture;
import Box2D.Dynamics.b2FixtureDef;
matuzo wrote:
I ran in to that problem but I can't remember anymore what it was..

have you imported all the necessary classes?

Code:
import Box2D.Dynamics.b2Fixture;
import Box2D.Dynamics.b2FixtureDef;


well, I think it is not the import thing going wrong here.
Firstly, in the source file b2World.as, there is required import statements:
Code:
import Box2D.Dynamics.*;
import Box2D.Dynamics.Contacts.*;
import Box2D.Dynamics.Joints.*;


Secondly, I have added your code to the b2World.as, it still got the compiler error i mentioned above.

Anyway, thanks for your help:)
Oh, ok. You definitively don't need to change anything in b2World.as

I was trying to reproduce the error, but I wasn't successful. If you want to, upload the file and I'll take a look at it. I'm not a pro, but I was playing a lot with box2d the last few days,... so maybe I can help 😉
matuzo wrote:
Oh, ok. You definitively don't need to change anything in b2World.as

I was trying to reproduce the error, but I wasn't successful. If you want to, upload the file and I'll take a look at it. I'm not a pro, but I was playing a lot with box2d the last few days,... so maybe I can help 😉


that s pretty easy, because i just download the source file from: http://www.box2dflash.org/download
download "Box2DFlash 2.1a -> Flash 10" version

Then follow the instructions of ReadMe.txt, you probably to get the errors.
Make sure your IDE is Flash Professional CS5 and your Flash Player is version 10.

here is the instructions from ReadMe.txt:
To compile the demo:
//
Flash: extract Box2DFlashAS3 and open PhysTest.fla in Flash CS3 (9) and hit Ctrl+Enter.

I guess the IDE and Flash Player is not compatible to this code.
I even send a email to boristhebrave, the co-author of Box2DFlash 2.1a, but have not got reply yet:(
I also get complier errors, and with all the Box2DFlash example files. It happens with both CS5 and CS5.5.

Something is screwed with the example files and needs fixing...
Hi all, I also faced the same problem before this, but after I try something I had been solved this problem. I state down the fla file I want to compile.
PhysTest.fla, on "properties" option, "publish" tab, find "profile" and click edit.
It will go to Publish Setting--> Flash Tab. Change the "Player" to Flash Player 10 instead of 9, then click OK, and try to compile again. It's work fine to me, hope this will solve your problem. 😀

Original thread: https://box2d.org/forum/viewtopic.php?t=6909