So in Part 3 of this series we will be moving away from relying on the debug draw and SetAsBox function, and, instead we will be creating custom shapes and textures by building a truck in our Box2D world. This process is relatively simple but there are a few caveats. Read more

If you have used the fl.control components bundled with Flash you might have noticed there is no property to enable button mode. It seems a bit odd, since things like SimpleButtons by default have a buttonMode resulting in a nice hand cursor to indicate interactivity.

The good news is that it is possible to emulate the button mode :)

So here it is. Pass your component into the following function:

		function addButtonMode(display:*):void
		{
			if (display is Sprite)
			{
				for (var i:int = 0;i < display.numChildren;i++)
				{
					addButtonMode(display.getChildAt(i));
				}
				display.useHandCursor = true;
				display.buttonMode = true;
			}
		}

Box2D 2.1a Tutorial – Part 2 (Joints)

67

Welcome to Part 2 of my Box2D tutorial series. In the last tutorial we looked at the very basics of creating a world and populating it with a box . While it was necessary to learn that first, it was not terribly exciting. In this tutorial topic, we will learn about joints, which will allow us to start creating some cool stuff!
Read more