skip to main | skip to sidebar

Coazure's Blog

Pages

  • 首頁

星期六, 11月 28

Tweener與MC Tween 的不同

< 精神 >
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的筆記本
張貼者: Coazure 於 上午9:44 以電子郵件傳送這篇文章BlogThis!分享至 X分享至 Facebook分享到 Pinterest
標籤: 程式心得, flash

4 意見:

tony 提到...

?????????

2009年11月28日 上午10:03
Coazure 提到...

= =

2009年11月30日 下午4:54
好像是俊宇 提到...

看沒耶...

2009年11月30日 晚上7:35
好像是俊宇 提到...

看沒耶...

這是瞎毀

2009年11月30日 晚上7:40

張貼留言

較新的文章 較舊的文章 首頁
技術提供:Blogger.

文章分類

  • 工作 (1)
  • 心情 (24)
  • 作品 (2)
  • 音樂 (4)
  • 程式心得 (5)
  • flash (1)
  • java (1)

日期分類

  • ►  2011 (1)
    • ►  3月 (1)
  • ►  2010 (17)
    • ►  10月 (2)
    • ►  7月 (2)
    • ►  5月 (1)
    • ►  3月 (3)
    • ►  2月 (6)
    • ►  1月 (3)
  • ▼  2009 (18)
    • ►  12月 (6)
    • ▼  11月 (4)
      • Tweener與MC Tween 的不同
      • 英文報告
      • 回文
      • 懶了..
    • ►  9月 (8)

最新回應

最新文章

人數統計

我的好友

 
Copyright (c) 2010 Coazure's Blog. Designed for Video Games
Download Christmas photos, Public Liability Insurance, Premium Themes