In order to view this page you need Flash Player 9+ support!

Get Adobe Flash player

XML Source

<code>
   <call method="graphics.beginFill" args="0x000000" />
   <call method="graphics.drawRect" args="0, 0, stage.stageWidth, stage.stageHeight"/>
     
   <make reference="container" class="flash.display.MovieClip" />
   
   <call method="addChild" args="container" />

   <make reference="sim" class="QuickBox2D" args="container" />
  
   <make reference="renderParams" class="Object">
    <set fillColor="0x2772B3" lineColor="0x0098FF"/>
   </make>
   
  <call method="sim.setDefault" args="renderParams" />
  
  <call method="sim.createStageWalls" />
  
   <make reference="circParams" class="Object">
    <set x="3" y="3" radius="0.5"/>
   </make>
   
   <call reference="c0" method="sim.addCircle" args="circParams" />
   
   <set circParams.x="4.5" />
   
   <call reference="c1" method="sim.addCircle" args="circParams" />
   
   <set circParams.x="6" />
   
   <call reference="c2" method="sim.addCircle" args="circParams" />
   
   <set circParams.x="7.5" />
   
   <call reference="c3" method="sim.addCircle" args="circParams" />
   
   <make reference="jointParams" class="Object">
    <set a="c0.body" b="c1.body" />
   </make>
   <call method="sim.addJoint" args="jointParams" />
   
   <make reference="jointParams" class="Object">
    <set a="c1.body" b="c2.body"/>
   </make>
   <call method="sim.addJoint" args="jointParams" />
   
   <make reference="jointParams" class="Object">
    <set a="c2.body" b="c3.body"/>
   </make>
   <call method="sim.addJoint" args="jointParams" />
   
   <set circParams.x="5" circParams.y="5" circParams.radius="1" />
   
   <call method="sim.addCircle" args="circParams" />
   
   <call method="sim.start" />
   <call method="sim.mouseDrag" />
  
</code>