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: forked from: Polygon Confusion

just a simple poly example to clear up confusion
/**
 * Copyright hacker_rajesh ( http://wonderfl.net/user/hacker_rajesh )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/yJ6D
 */

// forked from Altschuler's forked from: Polygon Confusion
// forked from shapevent's Polygon Confusion
package {
    import flash.display.*;
    import com.actionsnippet.qbox.*;
    
    // just a simple poly example to clear up confusion
    
    public class FlashTest extends MovieClip {
        public function FlashTest() {
            // write as3 code here..
            
            /*
              
               0
              / \ 
             0_0 0
               | |
               0-0  
               
            */
            
            var sim:QuickBox2D = new QuickBox2D(this);
            sim.createStageWalls();
            
            // define the contour of your poly
            // no limits as long as it doesn't cross over
            // itself
          
                                            
             for (var i : uint = 0; i < 100; i++)
             {
             	   
            sim.addCircle({x:Math.random()*13, y:Math.random()*13, radius : .5 * Math.random()});
             }                            
            sim.mouseDrag();
                                          
            
            sim.start();
            sim.mouseDrag();
        }
        
    }
}