皿
何に使うかはさておき。。
/**
* Copyright otias ( http://wonderfl.net/user/otias )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/3VUg
*/
/**
* 何に使うかはさておき。。
*/
package
{
import flash.display.Sprite;
import flash.filters.DropShadowFilter;
import flash.events.Event;
/**
* @author otiashee
*/
public class Saucer extends Sprite
{
private var saucerInner:Sprite;
private var saucerOuter:Sprite;
private var innerShadow:DropShadowFilter;
private var outerShadow:DropShadowFilter;
public function Saucer()
{
saucerInner = new Sprite();
saucerOuter = new Sprite();
init();
}
private function init():void
{
with(saucerInner.graphics)
{
beginFill(0xFFFFFF);
drawCircle(0, 0, 52);
endFill();
}
with(saucerOuter.graphics)
{
beginFill(0xFFFFFF);
drawCircle(0, 0, 70);
endFill();
}
innerShadow = new DropShadowFilter(2, 0, 0x000000, 0.6, 6, 4, 1, 3, true);
outerShadow = new DropShadowFilter(6, 0, 0x000000, 0.8, 5, 4, 1, 3, false);
saucerInner.x = saucerOuter.x = stage.stageWidth / 2;
saucerInner.y = saucerOuter.y = stage.stageHeight / 2;
saucerInner.filters = [innerShadow];
saucerOuter.filters = [outerShadow];
addChild(saucerOuter);
addChild(saucerInner);
addEventListener(Event.ENTER_FRAME, onLoop);
}
private function onLoop(event:Event):void
{
innerShadow.angle += 1;
outerShadow.angle += 1;
saucerInner.filters = [innerShadow];
saucerOuter.filters = [outerShadow];
}
}
}