[ Design ]/Flash

탄력있는 버튼

관이119 2012. 9. 13. 15:48
Urban Stereo | fitsys
http://blog.naver.com/fitsys/80003153679

레이어를 하나 추가하고 적어넣는다

fscommand("allowscale",false);

Movieclip.prototype.elasticScale = function(target, accel, convert) {

this.xScale = this.xScale * accel + (target - this._xscale) * convert
this.yScale = this.yScale * accel + (target - this._yscale) * convert
this._xscale += this.xScale
this._yscale += this.yScale
}

그리고 또다시 레이어 하나를 추가하고 무비클립을 삽입하고 스크립트를 작성한다

onClipEvent (enterFrame) {

if (over==1) {

elasticScale(200, 0.9, 0.1)

} else {

elasticScale(100, 0.9, 0.1)

}

}