11/24/2010

as2 基本按鈕搭配Tweenner動態

//as2按鈕搭Tweenner
//這段要放入,讓flash知道你要讀tweener進來
import caurina.transitions.Tweener;

mc.onRollOver = function() {
Tweener.addTween(mc,{_xscale:110, _yscale:110, time:0.2, transition:"easeInOutCubic"});
};
mc.onRollOut = function() {
Tweener.addTween(mc,{_xscale:100, _yscale:100, time:0.5, transition:"easeInOutCubic"});
};
mc.onRelease = function() {
Tweener.addTween(mc,{_xscale:100, _yscale:100, time:0.5, transition:"easeInOutCubic"});
};

//---------------------------------
Tweener.addTween(clip_mc,
    {
       x            :0,//clip_mc物件的x屬性。
       y            :0,//clip_mc物件的y屬性。
       _Blur_blurX    :0,//修改Blur濾鏡的x值
       _Blur_blurY     :0,//修改Blur濾鏡的y值
       time            :1,//在幾秒鐘內完成該Tweener的動作。
       transition    :"easeInOutBack",//動畫類型。
       onComplete    :tween1//當該Tweener動畫完成時,會呼叫該函式。
    });

No comments:

Post a Comment