flash on 2016-3-23
/**
* Copyright wrotenodoc ( http://wonderfl.net/user/wrotenodoc )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/YgHg
*/
package {
import flash.utils.getTimer
import flash.display.Sprite;
public class FlashTest extends Sprite {
private var con:Sprite
private var inv:Sprite
public function FlashTest() {
//graphics.beginFill(0xffffff)
//graphics.drawRect(0, 0, 465, 465)
// write as3 code here..
addChild(con = new Sprite)
for(var i:int=0; i<8; i++){
var q:Q = new Q(20 + i*5)
q.x = Math.random() * 465
q.y = Math.random() * 465
con.addChild(q)
}
addEventListener("enterFrame", loo)
stage.frameRate = 60
stage.quality = "low"
addChild(inv = new Sprite)
inv.graphics.beginFill(0x0)
inv.graphics.drawRect(0, 0, 465, 465)
inv.blendMode = "invert"
}
private function loo(e:Object):void {
for(var i:int=0; i<con.numChildren; i++){
Q(con.getChildAt(i)).turn()
}
if(Math.abs(getTimer() % 300) < 150) inv.visible = false
else inv.visible = true
}
}
}
import flash.utils.getTimer
import flash.display.Sprite
import flash.display.Shape
class Q extends Sprite {
private var N:int
public function Q(num:int, blend:String="overlay") {
blendMode = blend
N = num
x = y = 465 / 2
for(var n:int=0; n<num; n++){
addChild(new K((n/2)*(Math.random()-.5),(n/2)*(Math.random()-.5),5+n*11.14))
}
}
public function turn():void {
for(var i:int=0 ; i < numChildren; i++){
getChildAt(i).rotation += 2 * (1 + i/numChildren)
}
scaleX = scaleY = 1 + Math.sin(getTimer()/1000)*.5
rotation += N/4
}
}
/******************************************************************************/class K extends Shape { ///////////////////////////
//
//////////
//////////////////////////
///////
//////////////
///////////////////////
////////////
/// /////////////////////
public function K(a:Number,
c:Number,
b :Number)
{
graphics
.lineStyle(25, Math.random() * 0xf3f23f, 1)
graphics.drawCircle(a, c,
b)
x
= y
= 256
}
}