< 精神 >
MC Tween 是as1和2的延伸 , 是Tweener的前輩 .
Tweener 可以到as3
< 語法上的不同 >
載入tweener
import caurina.transitions.Tweener;
主要的不同 , 第一 , Tweener 不是建立在物件上的 , 要讓哪個物件動作是他的第一個參數
Tweener.addTween(myMC, ...);
MC Tween是建立在物件上
my_mc.tween(.............)
Tweener裡面的參數是可以顛倒放的 沒差 MC Tween是順序一定要一樣
Tweener.addTween(myMC, {_x:100, time:2, transition:"linear", delay:1});
Tweener.addTween(myMC, {_x:100, time:2, delay:1, transition:"linear"});
省略參數 他就會是預設值 不用像MC Tween 要給一個空值
可以有複合的屬性 x y alpha 什麼鬼都可以一起用
Tweener.addTween(myMC, {_x:100, _y:10, _alpha:100, time:2, delay:1, transition:"linear"});
< 事件 >
另一個主要的不同 是Tweener 的事件比較多種 以前MC Tween 只有一個完成時觸發
Tweener.addTween(myMC, {_x:10, time:1, onStart:this.starting, onUpdate:this.updating, onComplete:this.completing});
this.starting = function() {
trace ("tweening is starting.");
};
this.updating = function() {
trace ("tweening has updated.");
};
this.completing = function() {
trace ("tweening has finished.");
};
要看其他可以用的事件 從
http://hosted.zeh.com.br/tweener/docs/en-us/
< 另外 >
Tweener比較容易組織化
引用全文: am4:00的筆記本
4 意見:
?????????
= =
看沒耶...
看沒耶...
這是瞎毀
張貼留言