forked from: 懐中電灯
/**
* Copyright bshh ( http://wonderfl.net/user/bshh )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/hSWY
*/
// forked from bshh's 懐中電灯
// forked from bshh's forked from: forked from: forked from: forked from: forked from: forked from: forked from: forked from: circleをドラッグして移動する
// forked from bshh's forked from: forked from: forked from: forked from: forked from: forked from: forked from: circleをドラッグして移動する
// forked from bshh's forked from: forked from: circleをドラッグして移動する
// forked from bshh's forked from: circleをドラッグして移動する
// forked from 110R's circleをドラッグして移動する
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.geom.*;
import caurina.transitions.Tweener;
import caurina.transitions.properties.*;
FilterShortcuts.init();
ColorShortcuts.init();
[SWF(width="465",height="465",backgroundColor="0x000000")]
public class MouseDrag extends Sprite {
public function MouseDrag() {
var circle:Sprite=new Sprite();
circle.graphics.beginFill(0xFADE00);
circle.graphics.drawCircle(0,0,100);
circle.graphics.endFill();
addChild(circle);
circle.buttonMode=true;
circle.x=232;
circle.y=232;
Tweener.addTween(circle, { _brightness:1, time:1, transition:"linear"} );
Tweener.addTween(circle,{_Blur_blurX:100,_Blur_blurY:100,time:0,transition:"liner"});
circle.addEventListener(Event.ENTER_FRAME, pica);
circle.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
circle.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
}
private function onMouseDown(e:MouseEvent):void{
e.currentTarget.startDrag();
}
private function onMouseUp(e:MouseEvent):void{
e.currentTarget.stopDrag();
}
private function pica(e:Event):void{
alpha=Math.random();
}
}
}