取caurina 舍gs --TweenLite

今天重新去了一下 gs  网站!发现好像TweenLite不是免费类库了! 商业用途需要收费!

 所以只好用caurina

 

 

在国外,  caurina 商业应用最广泛!主要得益于它的licese 是免费的 !可用于商业开发:

 

下面是caurina的用法  和TwenLite类似!:

 

 

教程网站:

http://www.flepstudio.org/forum/tutorials/1553-caurina-tweener-zeh-fernando-tutorial-1-a.html

 

 

http://www.flashuser.net/flash-actionscript-as3/using-caurina-tweener-class-as3.html

 

 

 

 

以及关于bezier的用法 :  注意   _bezier  _color 的写法前面有一下划线

 

_bezier的值是一数组 Array

 

下面是摘自老外的tutorial

 

 

 

 

 

Lets say you want to use Tweener to animate a camera in your PV3D Scene from z:0 to z:1400... but you want it to animate along a path with smooth bezier curves. Piece of cake! Here is how you do it.

Example (don't freak, there's a lot more comments than there is code):
//first you will need to import your Tweener classes
//in this case, also import the CurveModifiers class


import caurina.transitions.Tweener;
import caurina.transitions.properties.CurveModifiers;

//instantiate the CurveModifiers
CurveModifiers.init();

//create an Array that will hold the various bezier curve points
//the values indicate the that camera will swing from the left to the right
var curvePath:Array = new Array();
curvePath.push({x:400});
curvePath.push({x:-400});
curvePath.push({x:400});
curvePath.push({x:-400});
//you could also add in additional bezier curve point paramerts
//such as curvePath.push({x:400, y:200, z:200});

//set up a function to set the default position of the camera
//and to instantiate a tweener animation
//note that there is an additional parameter "_bezier" in the Tweener parameters
//in the "_bezier" parameter we passed in our curvePath array
function startTween():void
{
camera.z = -200;
Tweener.addTween(camera, {
x:0,
z:1400,
_bezier:curvePath,     
time:12,
transition:"linear",
onComplete:startTween});
}

//lastly, call the startTween function to fire it off
//since the Tweener function has an onComplete parameter
//of startTween the animation will loop continuously
startTween();

 

_bezier的值是一个数组:

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值