flash on 2009-5-14
/**
* Copyright sajiyama ( http://wonderfl.net/user/sajiyama )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/tw3x
*/
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import com.flashdynamix.motion.Tweensy;
public class Anime2 extends Sprite {
public function Anime2() {
stage.addEventListener(MouseEvent.CLICK,clickHandler);
}
private function clickHandler(event:MouseEvent):void{
var s:Sprite = new Sprite();
var sc:Number = Math.ceil(Math.random()*20);
s.graphics.beginFill(Math.random() * 0x1000000);
s.graphics.drawCircle(0,0,10);
s.graphics.endFill();
addChild(s);
s.x = event.stageX;
s.y = event.stageY;
s.scaleX = s.scaleY = 0;
Tweensy.to(s,{
scaleX:sc,
scaleY:sc
},1);
}
}
}