`HelloWorld` sample code don't have any motion.

Use example code(Flash9) downloaded from official site.
Run in Flash CS5.5, nothing error, but it just show some faces in stage, and nothing moves. Is that normal?

I view the code and put some traces on it. Update() is triggered every frame, but the coordinate of every `bb` in m_world.GetBodyList() is just the same result.
The world is given gravity(0,-10), so I expect those faces should fall down in this example.

Any thoughts?
In addition, I thought I found the problem.
When I trace(body.GetMass()), it returns 0.
But I can't find any member of SetMassFromShapes() of b2Body class.

Moreover, I create a b2MassData object with setting its mass and center value, fill it in body.SetMassData().
After those setting, I trace(body.GetMass()). It is STILL 0 !
What's wrong with this situation?
This from the second part of my post is the bug (and solution): viewtopic.php?p=34879#p34879

jayther wrote:But the bug in the code causing the simulation to show a bunch of frozen circles and boxes is the lack of assigning bodyDef.type (the body type (static, kinematic, or dynamic)) with b2Body.b2_dynamicBody in the "for" loop to create the test circles and boxes. The default value in b2BodyDef.type is b2_staticBody, so the HelloWorld simulation actually shows a bunch of static bodies. Adding a line to set bodyDef.type to dynamic would solve this problem and have a working simulation.


Basically, yes, it is normal for the Hello World to show like that when you download the 2.1a and run HelloWorld without changing anything. As you pointed out, it does look like stuff should be moving around, and you're probably right (and thus a mistake/bug in the HelloWorld.fla). It can be fixed by the solution above.
Thanks for your answer sincerely, though I finally found the same thing. 🙂
Anyway, thanks a lot.

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