Tweener的解釋→游移在兩種狀態間?蠻有一點意思.
所以,從某種狀態到另一種狀態間的漸變過程,該是Tweener類別的意圖。
Tweener是開放源碼的程式庫。
Tweener網址:http://code.google.com/p/tweener/
Tweener類別下載:http://code.google.com/p/tweener/downloads/list
Tweener Documentation:http://hosted.zeh.com.br/tweener/docs/en-us/
基本的Tweener漸變,需要知道以下1和2:
- import caurina.transitions.Tweener; //Tweener不是內建類別,必須匯入caurina類別套件下的transitions類別套件下的Tweener類別
- Tweener.addTween(target:Object, tweeningParameters:Object):Void//以Tweener類別的addTween方法,將tweeningParameters定義的漸變參數附加到target物件上,據此產生漸變動畫。
//target:Object — Any object that will suffer a tweening. These objects are usually MovieClip, TextField, or Soundinstances, or any other custom object with a numeric property that needs to be tweened.
//tweeningParameters
:Object — An object containing various properties of the original object that you want to tween on the original objects, with their final values assigned (some special properties are also allowed), as well as some built-in Tweener properties used when defining tweening parameters. This is like the recipe for the tweening, declaring both what will be tweened, and how.
//所以→
Tweener.addTween(目標物件:Object, 漸變參數:Object)
→目標物件可以是影片實體、文字欄位、聲音實體、其它擁有數值屬性的自訂物件。
→漸變參數定義目標物件新的屬性值,漸變過程即原有屬性值到新的屬性值之間的動畫過程。
swf例一:Tweener.addTween()
沒有留言:
張貼留言