forked from: Blendmode
/**
* Copyright darman ( http://wonderfl.net/user/darman )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/fbzo
*/
package
{
import flash.display.*;
import flash.events.*;
import gs.TweenMax;
import gs.easing.*;
[SWF(width="400", height="400", frameRate="60")]
public class FlashTest extends Sprite
{
public function FlashTest()
{
stage.addEventListener(MouseEvent.MOUSE_DOWN, this._downHandler );
}
private function _downHandler(e:MouseEvent):void
{
var sp:Sprite = new Sprite;
var g:Graphics = sp.graphics;
//g.clear();
sp.blendMode = BlendMode.DARKEN;
var r:Number= Math.floor((Math.random()*80)+5);
g.beginFill(Math.random()*0xFFFFFF);
g.drawCircle(0,0,r);
g.endFill();
addChild(sp);
//sp.x = Math.random() * stage.stageWidth -r;
//sp.y = Math.random() * stage.stageHeight -r;
sp.x = mouseX;
sp.y = mouseY;
sp.scaleX= 0;
sp.scaleY= 0;
TweenMax.to( sp, 0.3, { scaleX:1, scaleY:1, ease:Quint.easeOut } );
}
}
}