※現在、「wonderfl build flash online」求人コンテンツ制作に関してのアンケートを実施中です!みなさまのお力添えを頂いて、続々とアンケート結果が集まっていますが、まだまだ募集しております。ご協力のほど、どうぞよろしくお願いいたします!
wonderfl運営事務局
→アンケートページ(※ログインしてからお答えいただけるようになっています。)
BetweenAS3Filter
6. Filter tween with BetweenAS3 forked from: 6. Filter tween with BetweenAS3 1/20
- // forked from beinteractive's 6. Filter tween with BetweenAS3
- package
- {
- import flash.accessibility.Accessibility;
- import flash.display.Sprite;
- import flash.text.TextField;
- import flash.events.MouseEvent;
- import org.libspark.betweenas3.BetweenAS3;
- import org.libspark.betweenas3.tweens.ITween;
- import org.libspark.betweenas3.easing.*;
- public class Sample extends Sprite
- {
- public function Sample()
- {
- (addChild(new TextField()) as TextField).text = 'Click to start';
- stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
- }
- private function mouseUpHandler(e:MouseEvent):void
- {
- while (numChildren > 0) {
- removeChildAt(0);
- }
- var box:Box = addNewBox(180);
- box.x = 180;
- // BlurFilter, GlowFilter and DropShadowFilter Tween
- BetweenAS3.tween(box,
- // To 変化後
- { // x:150,
- _blurFilter: {blurX: 1, blurY: 1},//オブジェクトのぼかしを表現
- _glowFilter: { blurX: 24, blurY: 24},//影のぼかしを表現、影自体も含む
- _dropShadowFilter :{blurX:0,blurY:0,distance:50}//オブジェクトの分身(オフセット)を作る?
- },
- // From 変化前
- {
- _blurFilter: {blurX: 32, blurY: 32}, //オブジェクトのぼかしを表現
- _dropShadowFilter: {blurX:40,blurY:40,distance: 200}, //オブジェクトの分身(オフセット)を作る?
- _bevelFilter:{blurX:30,blurY:30}//オブジェクトの形状を表現
- },
- // Time
- 2.5,
- // Easing
- Cubic.easeOut
- ).play();
- }
- private function addNewBox(y:Number):Box
- {
- var box:Box = new Box();
- box.x = 20;
- box.y = y;
- addChild(box);
- return box;
- }
- }
- }
- import flash.display.Sprite;
- internal class Box extends Sprite
- {
- public function Box()
- {
- graphics.beginFill(0);
- graphics.drawRect(-10, -10, 20, 20);
- graphics.endFill();
- }
- }
6. Filter tween with BetweenAS3 forked from: 6. Filter tween with BetweenAS3
- // forked from beinteractive's 6. Filter tween with BetweenAS3
- package
- {
- import flash.display.Sprite;
- import flash.text.TextField;
- import flash.events.MouseEvent;
- import org.libspark.betweenas3.BetweenAS3;
- import org.libspark.betweenas3.tweens.ITween;
- import org.libspark.betweenas3.easing.*;
- public class Sample extends Sprite
- {
- public function Sample()
- {
- (addChild(new TextField()) as TextField).text = 'Click to start';
- stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
- }
- private function mouseUpHandler(e:MouseEvent):void
- {
- while (numChildren > 0) {
- removeChildAt(0);
- }
- var box:Box = addNewBox(230);
- box.x = 230;
- // BlurFilter, GlowFilter and DropShadowFilter Tween
- BetweenAS3.tween(box,
- // To
- {
- _blurFilter: {blurX: 0, blurY: 0},
- _glowFilter: {color: 0x000000, blurX: 32, blurY: 32}
- },
- // From
- {
- _blurFilter: {blurX: 32, blurY: 32},
- _glowFilter: {color: 0x000000, blurX: 0, blurY: 0}
- //_dropShadowFilter: {distance: 32}
- },
- // Time
- 2.0,
- // Easing
- Cubic.easeOut
- ).play();
- }
- private function addNewBox(y:Number):Box
- {
- var box:Box = new Box();
- box.x = 20;
- box.y = y;
- addChild(box);
- return box;
- }
- }
- }
- import flash.display.Sprite;
- internal class Box extends Sprite
- {
- public function Box()
- {
- graphics.beginFill(0);
- graphics.drawRect(-10, -10, 20, 20);
- graphics.endFill();
- }
- }
6. Filter tween with BetweenAS3 forked from: 6. Filter tween with BetweenAS3
- // forked from beinteractive's 6. Filter tween with BetweenAS3
- package
- {
- import flash.display.Sprite;
- import flash.text.TextField;
- import flash.events.MouseEvent;
- import org.libspark.betweenas3.BetweenAS3;
- import org.libspark.betweenas3.tweens.ITween;
- import org.libspark.betweenas3.easing.*;
- public class Sample extends Sprite
- {
- public function Sample()
- {
- (addChild(new TextField()) as TextField).text = 'Click to start';
- stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
- }
- private function mouseUpHandler(e:MouseEvent):void
- {
- while (numChildren > 0) {
- removeChildAt(0);
- }
- var box:Box = addNewBox(230);
- box.x = 230;
- // BlurFilter, GlowFilter and DropShadowFilter Tween
- BetweenAS3.tween(box,
- // To
- {
- _blurFilter: {blurX: 0, blurY: 0},
- _glowFilter: {blurX: 32, blurY: 32}
- },
- // From
- {
- _blurFilter: {blurX: 32, blurY: 32},
- _dropShadowFilter: {distance: 32}
- },
- // Time
- 2.0,
- // Easing
- Cubic.easeOut
- ).play();
- }
- private function addNewBox(y:Number):Box
- {
- var box:Box = new Box();
- box.x = 20;
- box.y = y;
- addChild(box);
- return box;
- }
- }
- }
- import flash.display.Sprite;
- internal class Box extends Sprite
- {
- public function Box()
- {
- graphics.beginFill(0);
- graphics.drawRect(-10, -10, 20, 20);
- graphics.endFill();
- }
- }
notice: 




