Changes to Box2DFlash “Hello World” example.
I’ve talked about the basics of Box2DFlash v1.4.3 in my Introductory tutorial. I showed how to create your world and how to introduce simple bodies into that world. With the release of Box2DFlash v2.0.0 the basics remain mostly the same, there are a few details changed. I need to go over these small changes before I move on to the next step of adding joints and forces to the bodies.
The first and biggest change (although really a small thing) is that we no longer work in pixels! We now work in units that by default equal 30 pixels to 1 unit (think of it as meters; 30px : 1m). With this change our normal gravity is no longer (0, 300) but instead (1, 10). This makes more sense to me at least because gravity in reality is 9.81 m/s/s. This is going to effect almost everything you do, from applying forces to setting the width and height of a box.








As a designer you might be really excited about the power Flash CS3 has to offer you, but a little frustrated with the complicated ActionScript required to turn your vision into reality. Or maybe, as a Flash developer you are getting hung up on the difficult transition from ActionScript 2.0 to AS 3.0. Well, it’s my job here to try and help you through that learning process.










