import gs.TweenMax;
import gs.easing.*;



var _spr:Sprite = new Sprite();
_spr.graphics.beginFill(0x0000ff, 1);
_spr.graphics.drawRect((stage.stageWidth - 100) / 2, (stage.stageHeight - 100) / 2, 100, 100);
TweenMax.to(_spr, .5, {dropShadowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, distance:5}});



this.addChild(_spr);



var _btn:Sprite = new Sprite();
_btn.graphics.beginFill(0x000000, 1)
_btn.graphics.drawRect(stage.stageWidth - 30, stage.stageHeight - 30, 30, 30);
this.addChild(_btn);



_btn.buttonMode = true;
_btn.addEventListener(MouseEvent.CLICK, btnclick);



function btnclick (e:MouseEvent):void{
 TweenMax.to(_spr, 1, {tint:Math.random() * 0xffffff, ease:Expo.easeOut});
}






 - Math.random() * 0xffffff : Color 랜덤 추출.
 - TweenMax.dropShadowFilter - 그림자.


참고 사이트 : http://blog.greensock.com/tweenmax/

'ActionScript3.0 > 기초' 카테고리의 다른 글

텍스트 필드에 포커스 이동하기.  (0) 2010.04.15
TimerEvent()  (0) 2010.03.19
Sprite  (0) 2010.02.09
mouseEnabled  (0) 2010.02.04
Split  (0) 2010.02.03

+ Recent posts