I created a new demo. Download it, add your own (free) PBE swc file from Pushbuttonengine.com, and test the demo!
Here is a simple but complete Box2D physics example. A FLA file contains the skins for the 2 objects. XML loads the entities and puts the on the screen. Click with the mouse to create a new Box2D object. Cool!
As an FYI, I built it from the PBE source code (as files) on GIT as of a week before this post. Not sure that matters. Add your own source or swc for PBE to my file (attached).
* You can change the xml and the main document class easily to adjust the position and number of objects. Go for it!
* You can also comment out the debugger code in the xml (see a comment in that file) to remove the debug-outlines (boxes shown around the box2d objects). The debugger is helpful for learning, but not desirable in your final game.
- Follow comments and add your own comments on the PushButtonEngine Forums.
- Question – Click the mouse button. The star shows for 1 frame VERY large, then changes to the desired size. How can I eliminate the odd sizing on that first frame (ideally) or hide (acceptable workaround) the object for that one first frame?
- Question – The center of the screen is 0,0. How in XML can I make the 0,0 be the upper-left of the stage (like Flash/Flex generally has it). Please test your suggestion in the attached zip and then post your answer here. Thanks so much!
[private_Free member]Enjoy this members-only content!
- Download the PBEBox2DXML.zip Flash Builder 4.5 as3-only Project.