In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

QuickBox2Dを使ってBox2DAS3を簡単に

Get Adobe Flash player
by Evolutor 25 Jan 2010
/**
 * Copyright Evolutor ( http://wonderfl.net/user/Evolutor )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/dSVR
 */

package{
	import flash.display.MovieClip;
	import com.actionsnippet.qbox.*;
	
	public class Main extends MovieClip{
		public function Main():void{
			var sim:QuickBox2D = new QuickBox2D(this);
			//壁生成
			sim.addBox( { x:7.8, y:16, width:16, density:0, lineAlpha:1, fillAlpha:0 }); //床
			sim.addBox( { x:-0.5, y:0, height:200, density:0, lineAlpha:1, fillAlpha:0 }); //右壁
			sim.addBox( { x:16, y:0, height:200, density:0, lineAlpha:1, fillAlpha:0 }); //左壁
			
			for(var i =0; i<9; i++){
				sim.addBox( { x:7, y:5-i, width:2, height:1, isBullet:true } );
				sim.start();
			}
			// 斜めの床生成
			sim.addBox( { x:4, y:7, width:7, height:.3, angle:0.3, density:0, fillColor:0xff0000 } );
			sim.addBox( { x:10, y:10, width:7, height:.3, angle:-0.5, density:0, fillColor:0xff0000 } );
			sim.mouseDrag()
		}
	}
}