Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have made games with box2dflash, but how much ever i have wanted to try out the test bed, the resources on the net don't help me. I have a folder called Testbed and various Test???.as files inside it. It would be a great help if somebody could just jot down how the testing of a box2dflash game is done. Thank you

share|improve this question
up vote 2 down vote accepted
        package TestBed{

            //Do your imports   

            public class TestEmptyTest extends Test{

                public function TestEmptyTest(){
                    //Initialise your objects here

                override public function Update():void {

                    //This is called for you by the Test class
                    //But you call this manually, to keep it syncing

            } //TestEmptyTest

        } //TestBed

So, this is JUST the basic test class. If you throw this into the source path of your project, you should have a fully functional testbed test ready to use. If you want to see WHERE the test is added to the testbed itself, see the file in the root of the examples folder. This powers the TestBed application. More Notably, Look for the following on line 97 :

        var tests:Array = [

You can add your test by class name (TestEmptyTest), and it will show up in their list.

What makes it work?

1) Make sure you have the class path able to see the testbed folder

2) import TestBed.*; will bring the class into the already

3) creating a new instance of your class. Their framework does this for you, as long as you add it to their array.

Hope that helps!

More importantly, you gave almost no information. Some things you might want to include :

Version of Flex/Flash (And IDE)

Version of box2dflash

Code snippet of what it is that isn't working.

share|improve this answer
HEYY...thanks a lott i've been looking for this since months !! – Vishnu Dec 10 '10 at 9:24
Glad to have helped. – underscorediscovery Dec 23 '10 at 1:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.