flash on 2009-6-15
♥0 |
Line 32 |
Modified 2009-06-15 02:39:43 |
MIT License
archived:2017-03-10 01:05:11
ActionScript3 source code
/**
* Copyright flocdelay ( http://wonderfl.net/user/flocdelay )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/uVgs
*/
package {
import flash.display.Sprite;
import flash.utils.setInterval;
import caurina.transitions.Tweener;
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();
public class FlashTest extends Sprite {
private const LENGTH:int = 60;
public function FlashTest() {
setInterval(update, 100);
}
private function update():void {
var s:Sprite = new Sprite();
s.graphics.beginFill(0x1000000 * Math.random(), 0.6);
s.graphics.drawRect(0, 0, LENGTH, LENGTH);
s.x = Math.random() * stage.stageWidth;
s.y = Math.random() * stage.stageHeight;
s.graphics.endFill();
addChild(s);
Tweener.addTween(s, {
time: 2,
delay: 4,
alpha: 0,
_Blur_blurX: 60,
_Blur_blurY: 60,
onComplete: function():void {
removeChild(s);
}
});
}
}
}