forked from: forked from: forked from: flash on 2010-2-10
forked from forked from: forked from: flash on 2010-2-10 (diff: 15)
ActionScript3 source code
/**
* Copyright hacker_j0htd766 ( http://wonderfl.net/user/hacker_j0htd766 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/4ay0
*/
// forked from hacker_j0htd766's forked from: forked from: flash on 2010-2-10
// forked from hacker_j0htd766's forked from: flash on 2010-2-10
// forked from hacker_j0htd766's flash on 2010-2-10
package{
import flash.display.MovieClip;
public class index extends MovieClip{
public function index(){
var repeatCount:int = 15;
for(var i:int=0; i<repeatCount; i++){
var centerX:Number = Math.floor(Math.random()*400)+50;
var centerY:Number = Math.floor(Math.random()*400)+50;
var r:Number = Math.ceil(Math.random()*100);
addChild(new DrawCircle(centerX,centerY,r));
}
}
}
}
import flash.display.MovieClip;
class DrawCircle extends MovieClip{
public function DrawCircle(centerX:Number,centerY:Number,r:Number){
graphics.lineStyle(2,0xff0006);
graphics.moveTo(centerX+r, centerY);
graphics.curveTo(r+centerX, Math.tan(Math.PI/8)*r+centerY,Math.sin(Math.PI/4)*r+centerX,
Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(Math.tan(Math.PI/8)*r+centerX,r+centerY,centerX,r+centerY);
graphics.curveTo(-Math.tan(Math.PI/8)*r+centerX,r+centerY,-Math.sin(Math.PI/4)*r+centerX,
Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(-r+centerX,Math.tan(Math.PI/8)*r+centerY,-r+centerX,centerY);
graphics.curveTo(-r+centerX,-Math.tan(Math.PI/8)*r+centerY,-Math.sin(Math.PI/4)*r+centerX,
-Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(-Math.tan(Math.PI/8)*r+centerX,-r+centerY,centerX, -r+centerY);
graphics.curveTo(Math.tan(Math.PI/8)*r+centerX,-r+centerY,Math.sin(Math.PI/4)*r+centerX,
-Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(r+centerX,-Math.tan(Math.PI/8)*r+centerY,r+centerX,centerY);
}
}