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

forked from: flash on 2010-3-15

参考にさせていただいたサイト
http://blog.alumican.net/2009/07/05_024440
衝突判定の練習
Get Adobe Flash player
by hacker_lra4mj5w 05 Sep 2011
    Embed
/**
 * Copyright hacker_lra4mj5w ( http://wonderfl.net/user/hacker_lra4mj5w )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/4ako
 */

// forked from brane7's flash on 2010-3-15
package {
    /*
    参考にさせていただいたサイト
    http://blog.alumican.net/2009/07/05_024440
    衝突判定の練習
    */
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import com.actionsnippet.qbox.*;
    public class FlashTest extends MovieClip {
        public function FlashTest() {
            // write as3 code here..
            var sim:QuickBox2D=new QuickBox2D(this);
            sim.setDefault({lineAlpha:0,fillAlpha:0.5});
            sim.createStageWalls({fillColor:0xcccccc});
        
            
            //サークルを作成
            var i:uint;
            for(i=0;i<200;i++){
                sim.addCircle({x:Math.random() * 200 / 30, y: Math.random() * 100 / 30 ,radius:Math.random() * 1,fillColor:0x0000ff,fillAlpha:1,categoryBits:0x0002,maskBits:0x0007});
                }
                //ボックスを作成
                var j:uint;
                
          
                sim.start();
                sim.mouseDrag();
        }
    }
}