forked from: flash on 2010-3-15
/**
* Copyright andrewexex886 ( http://wonderfl.net/user/andrewexex886 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/uRlI
*/
// forked from shapevent's flash on 2010-3-15
package {
import flash.text.TextField;
import flash.display.*;
public class FlashTest extends MovieClip {
import com.actionsnippet.qbox.*;
public function FlashTest() {
// write as3 code here..
var sim:QuickBox2D = new QuickBox2D(this);
sim.createStageWalls();
var testMC:MovieClip=new MovieClip();
testMC.x=testMC.y=90;
var testTF:TextField=new TextField();
testTF.htmlText="<font size='30' face='Helvetica'>testing</font>";
testTF.selectable=false;
testTF.rotationY=0;
testMC.addChild(testTF);
testTF.x=-testTF.width*0.5;
testTF.y=-testTF.height*0.25;
addChild(testMC);
var circleA:QuickObject = sim.addCircle({skin:testMC ,x:3, y:3,
radius:1});
var circleB:QuickObject = sim.addCircle({x:6, y:6,
radius:0.5});
var j:QuickObject = sim.addJoint({type:"distance", a:circleA.body,
b:circleB.body});
/* j.userData.graphics.clear();
j.userData.graphics.lineStyle(2,0xFF0000);
j.userData.graphics.lineTo(50,20);
j.userData.graphics.lineTo(100,100)*/
sim.start();
sim.mouseDrag();
}
}
}