Box2DFlash 2.1a RELEASE!

I'm trying to compile the test bed (Main.as in the Examples directory) with the Flex SDK (3.5).

I keep getting the following errors:
Code:
Error: Type was not found or was not a compile-time constant: Vector.
    public var indexA:Vector.<int> = new Vector.<int>(3);
                              ^
Error: Access of undefined property Vector.
    public var indexA:Vector.<int> = new Vector.<int>(3);
                              ^
------ SNIP ------

There are several more, excluded for brevity, all involving "Vector."
Are you compiling on Flash 10 ?
Xaren wrote:
Are you compiling on Flash 10 ?


I explicitly set target player version to 10.0.0 in my build file, and then it compiled successfully.

Thanks for the help.

BTW, I've never seen this kind of "template like" declaration style in AS3. Is there any documentation that explains this aspect of the language?
Thanks for the physics! Any news on when concave shapes will be added?

Or can we get this updated as well?
http://personal.boristhebrave.com/project/b2concavearc

Thanks again!
Is there anywhere for me to see what functionality does and does not yet work in this alpha? I noticed the b2FrictionJoints are not working yet.

I updated my whole project to the new alpha. It's looking good so far!
Aside from speed, I expect everything to work atm (and also edge shapes, which are dead code). It's just all untested, if you see a problem, just report it. I shall look into friction joints.

I am providing both flash 9 and 10 releases. Many people have been caught out by this apparently deceptive problem. If you've got any suggests for how I could be clearer, please let me know.

Concave arcs are not getting updated. They never worked brilliantly, and changes internal the engine make them harder to implement now.
Hi Boris!

Thanks for your work.

I port my current project from 2.0.1 to 2.1a and have a question. I used this code before to control my character on x-axis:
Quote:
body.m_linearVelocity.x = 5;


I couldn't find a way in 2.1a to change only the linear velocity in x-direction. Is use this code now:
Code:
body.SetLinearVelocity(new b2Vec2( -5.0, body.GetLinearVelocity().y));


Is there a better way to safe the y-value of the linear velocity?

Thanks!
Not atm.

You can do either of the following things, which are both technically not valid, but will work fine:

body.GetLinearVelocity().x = 5;

import Box2D.Common.b2internal;
body.b2internal::m_linearVelocity.x = 5;

The latter is what I'd recommend for the busy person attempting to port pre-existing code.
Thanks very much for your response. Didn't know how to use "import Box2D.Common.b2internal;" before.
SetLinearVelocity as well as most of the other body functions should probably do a wake up automatically

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