I cannot get the demo files to compile in Flex 3

Hi,

I downloaded the demo files from Box2DFlashAS3_2.0.2_.zip. I did my best to follow the Read Me in the zip archive, but I cannot get the applicaiton to compile in Flex 3.

I create a new ActionScript project (\Box2dTest) and copy HelloWorld.as, Main.as, \Box2d, \Genaral and \TestBed to the level beneath project folder \Box2dTest. When I do it this way, I cannot set Main.as as the default applicaton. [Capture1.jpg]
Attachment:
Capture1.JPG


I then move all the files from the archive to \src, I can then set Main.as as the default application, but the application has tons of errors. [Capture2.jpg]
Attachment:
Capture2.JPG


Can anyone provide me with detailed instructions on how to set up the demo in Flex Builder 3 and get it to compile properly?

Regards.
Those are warnings, I use Flash IDE, so I'm not sure if I see all the same warnings that Flex gives you, but I assume that box2dAS3 is not completely warning-free.

So, if it compiles, even with warnings, then you shouldn't worry about it.
Unfortunately, the swf does show the figures and stairs, but no gravity. I can drag a line from the figure though.
I believe all of this is fixed in svn. Also code in svn is up to date with c++ box2d. So the easiest and most clever way is to get box2dflash from svn.

But if you want to use version you've already downloaded do the following:
  1. For all the functions that do not have return type set the apropriate return type. In most cases this type is void, but not always, just look what function returns.
  2. Also there's one variable without type, timeSinceLastKey, set it's type to Number.
  3. And the last thing, you need to change
    Code:
    public var m_timeStep:Number = 1/30;
    to
    Code:
    public var m_timeStep:Number = 1/30.0;
    on line 136 in file Test.as.
That's all.
Thanks Roman: Your input solved my issue.

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