greensock是个很不错的类库,故转载了一些关于其中类使用方法的文章。

一、greensock_plugins常用功能中文简介

http://bbs.9ria.com/thread-400375-1-1.html

原文链接:http://www.contactu.cn/article.asp?id=133

因为在网上已经发现一些未注明出处的转载,所以我特地在天地会重发此文,转载请注明本人原创即可。
--------------------------------------------------------------------------------------------------------
com.greensock.plugins是greensock库中,与tweenLite/TweenMax等tween类搭配使用的组合功能。虽然号称是插件,但是功能真的很强。有小而精练的功能,也有象运动模拟这样的的大块头功能,这些都需要使用者慢慢的探索。这里只列出了自己常常使用的一些,让大家能少读几行英文。
具体的使用方法、语法、如何包含库等,可以阅读原文示例: http://www.greensock.com/as/docs/tween/com/greensock/plugins/package-detail.html
这里还有一个更形象的的动画演示及代码生成器: http://www.greensock.com/as/swf/PluginExplorer-v11.swf
另外,JS版本的plugins库也已经有了,文档在这里: http://api.greensock.com/js/ ,相比AS来说,只能说太弱太弱了。可以想见,基于JS的动画开发,还在远远的追赶之中。

plugins名称 我的描述 原英文描述(英文好的请自行对照)
AutoAlphaPlugin 常用,当缓动alpha到零值时,将visible自动置为false不可见状态。 Tweening "autoAlpha" is exactly the same as tweening an object's "alpha" except that it ensures that the object's "visible" property is true until autoAlpha reaches zero at which point it will toggle the "visible" property to false.
BevelFilterPlugin 不常用,浮雕边滤镜功能。 Tweens a BevelFilter.
BezierPlugin 不常用,但功能强大,可以拟合贝塞尔曲线路径。 Bezier tweening allows you to tween in a non-linear way.
BezierThroughPlugin 不常用,贝塞尔曲线路径相关。 Identical to bezier except that instead of defining bezier control point values, you define points through which the bezier values should move.
BlurFilterPlugin 常用,模糊效果全靠它了。
Tweens a BlurFilter.
CacheAsBitmapPlugin 没用过。 Forces the cacheAsBitmap property of a DisplayObject to be a certain value (true or false) during the tween and then sets it back to whatever it was before the tween was rendered for the first time.
CirclePath2DPlugin   Tweens an object along a CirclePath2D motion path in any direction (clockwise, counter-clockwise, or shortest).
ColorMatrixFilterPlugin   ColorMatrixFilter tweening offers an easy way to tween a DisplayObject's saturation, hue, contrast, brightness, and colorization.
ColorTransformPlugin 很常用,尤其在做一些变色效果时,比如鼠标点上去变色、变高亮等--鼠标移开后又恢复原状等。
Ever wanted to tween ColorTransform properties of a DisplayObject to do advanced effects like overexposing, altering the brightness or setting the percent/amount of tint? or maybe tween individual ColorTransform properties like redMultiplier, redOffset, blueMultiplier, blueOffset, etc.
DropShadowFilterPlugin 常用,阴影滤镜,跟发光略有区别。 Tweens a DropShadowFilter.
DynamicPropsPlugin   If you'd like to tween something to a destination value that may change at any time, DynamicPropsPlugin allows you to simply associate a function with a property so that every time the tween is rendered, it calls that function to get the new destination value for the associated property.
EndArrayPlugin   Tweens numbers in an Array.
EndVectorPlugin   Tweens numbers in an Vector.<Number>.
FrameBackwardPlugin 小功能,向前N帧。 Tweens a MovieClip backward to a particular frame number, wrapping it if/when it reaches the beginning of the timeline.
FrameForwardPlugin 小功能,向后N帧。 Tweens a MovieClip forward to a particular frame number, wrapping it if/when it reaches the end of the timeline.
FrameLabelPlugin 居家必备之常用功能,缓动到指定的帧标签。 Tweens a MovieClip to a particular frame label.
FramePlugin 缓动到指定帧(用帧数字表示的)。 Tweens a MovieClip to a particular frame number.
GlowFilterPlugin 居家必备功能,发光滤镜值的缓动控制。 Tweens a GlowFilter.
HexColorsPlugin   Although hex colors are technically numbers, if you try to tween them conventionally, you'll notice that they don't tween smoothly.
LiquidPositionPlugin 很少用的功能,要跟LiquidStage相结合的一个功能。
LiquidStage本来就是GS会员才有的功能,一般人都不会用。LiquidStage介绍参见拙作:http://www.contactu.cn/article.asp?id=60
If you're using LiquidStage and you'd like to tween a DisplayObject to coordinates that are relative to a particular PinPoint (like the CENTER) whose position may change at any time,LiquidPositionPlugin makes it easy by dynamically updating the destination values accordingly.
MotionBlurPlugin 高级货-运动模糊插件,可以在运动时按运行方向产生模糊效果,做一些求逼真的效果,非常有用!但这是个会员才拥有的功能,好吧,反正我是会员。 MotionBlurPlugin provides an easy way to apply a directional blur to a DisplayObject based on its velocity and angle of movement in 2D (x/y).
Physics2DPlugin 高级货,会员功能,能产生逼真的运动学效果,看示意图就知道了。 Provides simple physics functionality for tweening a DisplayObject's x and y coordinates based on a combination of velocity, angle, gravity, acceleration, accelerationAngle, and/or friction.
PhysicsPropsPlugin   Sometimes you want to tween a property (or several) but you don't have a specific end value in mind - instead, you'd rather describe the movement in terms of physics concepts, like velocity, acceleration, and/or friction.
QuaternionsPlugin   Performs SLERP interpolation between 2 Quaternions.
RemoveTintPlugin 常用,移除加色效果,加色效果就是下面的TintPlugin Removes the tint of a DisplayObject over time.
RoundPropsPlugin   If you'd like the inbetween values in a tween to always get rounded to the nearest integer, use the roundProps special property.
ScalePlugin 小功能,让scaleX和scaleY同时变化。 ScalePlugin combines scaleX and scaleY into one "scale" property.
ScrollRectPlugin 小功能,让方块形状进行x/y/宽/高的同时变化。 Tweens the scrollRect property of a DisplayObject.
SetActualSizePlugin 没看太懂,似乎是让一些组件类恢复到原来的形状,不常用。 Some components require resizing with setActualSize() instead of standard tweens of width/height in order to scale properly.
SetSizePlugin 小功能。让宽和高同时变化。 Some components require resizing with setSize() instead of standard tweens of width/height in order to scale properly.
ShortRotationPlugin 不太常用但很有用的功能--沿短边旋转:当进行旋转时,会如果大于180度,会沿较小角度的那边旋转过去(反向)。 To tween any rotation property of the target object in the shortest direction, use "shortRotation" For example, if myObject.rotation is currently 170 degrees and you want to tween it to -170 degrees, a normal rotation tween would travel a total of 340 degrees in the counter-clockwise direction, but if you use shortRotation, it would travel 20 degrees in the clockwise direction instead.
SoundTransformPlugin 跟声音相关的,可以缓动一切跟声音相关的属性,音量、声道平衡、左转右等。 Tweens properties of an object's soundTransform property (like the volume, pan, leftToRight, etc.
StageQualityPlugin 对画面质量的一个缓动,没啥大用。 Sets the stage's quality to a particular value during a tween and another value after the tween which can be useful for improving rendering performance in the Flash Player while things are animating.
ThrowPropsPlugin   ThrowPropsPlugin allows you to simply define an initial velocity for a property (or multiple properties) as well as optional maximum and/or minimum end values and then it will calculate the appropriate landing position and plot a smooth course based on the easing equation you define (Quad.easeOut by default, as set in TweenLite).
TintPlugin 非常常用,向目标色缓动变色。比ColorTransformPlugin要简单,适用于简单的变色功能。 To change a DisplayObject's tint/color, set this to the hex value of the tint you'd like to end up at (or begin at if you're using TweenMax.from()).
TransformAroundCenterPlugin 常用!好用!以MC中心点进行旋转。 Normally, all transformations (scale, rotation, and position) are based on the DisplayObject's registration point (most often its upper left corner), but TransformAroundCenter allows you to make the 2D transformations occur around the DisplayObject's center.
TransformAroundPointPlugin 牛!用你指定的点进行旋转。 Normally, all transformations (scale, rotation, and position) are based on the DisplayObject's registration point (most often its upper left corner), but TransformAroundPoint allows you to define ANY point around which 2D transformations will occur during the tween.
TransformMatrixPlugin   TransformMatrixPlugin allows you to tween a DisplayObject's transform.matrix values directly (a, b, c, d, tx, and ty) or use common properties like x, y, scaleX, scaleY, skewX, skewY, rotation and even shortRotation.
TweenPlugin 这个不能直接用,是所有插件类的基类。 TweenPlugin is the base class for all TweenLite/TweenMax plugins.
VisiblePlugin 小功能,在任何缓动过程的终点,让MC不可见。 Toggles the visibility at the end of a tween.
VolumePlugin 跟音量相关的缓动,妈呀,总算写完了。 Tweens the volume of an object with a soundTransform property (MovieClip/SoundChannel/NetStream, etc.).


二、TweenMax使用方法记录

转自:http://bbs.9ria.com/thread-150136-1-1.html


greensock缓动类包之TweenMax
1~了解TweenMax类
    TweenMax建立在TweenLite核心类及TweenFilterLite基础之上,新增功能:
    1) 进行贝塞尔缓动
    2)连续的缓动(序列化的缓动)
    3)对对象数组中的对象进行同意的缓动使用allTo()或allFrom();
    4)缓动中的暂停/继续功能,使用pause()和resume()方法,或“paused”属性
    5)跳转至缓动的任何时段,使用“progress”属性。输入一个0~1之间的数值
    6)对16进制的颜色进行缓动,使用hexColors属性
    7)获取缓动效果的实例数组,该数组中包括了加在一个指定目标对象上的所有的缓动效果的实例,TweenMax.getTweensOf(mc);如果该mc应用了多个缓动效果,则返回一个数组,数组中是不同的缓动效果的实例
    8)获取TweenMax、TweenLite和TweenFilterLite的实例数组,使用静态函数getAllTweens();
    9)种植所有的缓动
    10)暂停/继续全部的缓动
2~常用方法
    ‍1)public function TweenMax(target:Object, duration:Number, vars:Object)
    描述:构造方法
    ‍target:目标对象;duration:持续的时间(单位:秒);vars:包含想要缓动的的属性值
     vars:缓动的常用属性包括{
    alpha:Number:目标对象在缓动结束时的alpha
    delay:Number:延迟缓动
    ease:Function:缓动函数
    easeParames:Array:缓动函数中的参数
‍    autoAlpha:Number:用来代替alpha属性,可获得一些附加小伙,实现透明度缓动效果
‍    volume:Number:改变MovieClip或者SoundChannel的音量,将缓动结束时的音量值调整为指定的值
‍    tint:Number:改变可显示对象的色调/颜色
‍    frame:Number:将MovieClip缓动到指定的帧频
‍    bezier:Array:Bezier缓动,允许你以非线醒的方式进行缓动
    bezierThrough:Array:贝赛尔曲线要经过的位置点
‍    orientToBezier:Array:使MovieClip自动调整自身的方向,使之符合贝塞尔路径[x,y,rotation,ang](rotation:旋转属性,ang:旋转的度数)
    hexColors:Object:缓动指定对象中相应颜色属性的值(TweenMax.to(my_obj,{hexColors:{mycolor:0Xff0000}}))
    onStart:Function:在缓动开始时想要执行的某个函数
‍    onStartParams:Array:缓动开始时要执行函数的参数
‍    onUpdate:Function:缓动过程中,每次更新属性值时,要执行的函数
    onUpdateParams:Array:同上。。
    onComplete:Function:缓动结束时要执行的函数
‍    onCompleteParams:Array:同上。。‍   
‍    renderOnStart:Boolean:阻止缓动的渲染效果直到缓动真正开始
    overwrite:Boolean:缓动效果是否可以被覆盖
    blurFilter:Object:应用模糊滤镜,需要传递一个具有下列属性的对象作为参数:blurX(横向的模糊度),blurY(纵向的模糊度),quality(品质,默认值为2)
    glowFilter:Object:应用发光滤镜,需要传递一个带有以下属性的对象:alpha,blurX,blurY,color,strength(强度),quality,inner(内侧发‍    ‍    ‍    光),knockout(挖空)
‍    colorMatrixFilter:Object:应用颜色矩阵滤镜,需要传递一个带有以下属性的对象:colorize(色调),amount(总量),contrast(对比度),brightness(亮度),saturation(饱和度),hue(色相),threshold(阀值),relative(相关性),matrix(颜色矩阵)
‍    dropShadowFilter:Object:应用阴影滤镜,需要传递一个带有以下属性的对象:alpha,angle(角度),blurX,blurY,color,distance(距离),strength,quality
‍    bevelFilter:Object:应用斜角滤镜,需要传递一个带有以下属性的对象:angle,blurX,blurY,distance,hightlightAlpha(高亮区的透明度),highlightColor(高亮区的颜色),shadowAlpha(阴影区的透明度),shadowColor(阴影区的颜色),strength(强度),quality

‍    progress:Number:缓动进程0~1
‍    paused:Boolean:是否停止缓动

2)allTo(targets:Array, duration:Number, vars:Object):Array
返回的是一个数组保存了创建的所有TweenMax Object。
3)‍allFrom(targets:Array, duration:Number, vars:Object):Array
跟allTo一样,只是定义的是运动对象的初始状态,运动到当前状态。
4)‍complete(skipRender:Boolean = false, suppressEvents:Boolean = false):void
   强制TweenMax到最后结束部分。如果第一个参数设为true,则不会渲染,TweenMax将停在调用那一刻。如果第二个参数设为true则不会触发onCompelte,onUpdate等事件。
5)‍delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array = null, useFrames:Boolean = false):TweenMax 
   ‍延迟执行函数

6)getTweensOf(target:Object):Array
‍返回运动物体正在运行的的TweenMax Object
7)isTweening(target:Object):Boolean
‍判断是否正在缓动
8)‍updateTo(vars:Object, resetDuration:Boolean = false):void
‍可以在运行中新增或改变原有的属性变化值。第二个参数设为false时将不重播缓动,而继续缓动到新的值;设为true将中断并重播缓动。

三、Tweenlite的用法

转自:http://blog.csdn.net/jinglikeblue/article/details/9134433

TweenLite 是一个缓动的类包,功能强大,并且易于使用,为了更多的(E文欠佳的、初学的)朋友了解它,使用它,特此翻译了一下TweenLite 类文档中的说明文件,主要是对参数的说明,希望对大家有用。
描述:
缓动。 我们都在做。我们很多人都知道除了 Adobe’s Tween 类之外,还有很多更好的动画引擎,(比如 Tweener). 每种引擎都有它们各自的优缺点。
最近几年,为了得到一个更紧凑的,跑得更快,效率更高的引擎,我创建了 TweenLite (我无法接受其它的一些引擎带来的文件尺寸上的负担).它很快就融入到我的所有工作中。我告诉其它人,让大家能够从中获益,最终,我将它发布了出来。在过去的几年中,TweenLite越来越受欢迎,超乎了我的想像.
基于此,我又添加了一些新的功能,并且尽量保持这个文件的尺寸,让它小于3K。 TweenFilterLite 扩充了 TweenLite 并且加入了滤镜缓动,包含了 ColorMatrixFilter 的一些效果,比如饱和、对比、增亮、色调,甚至是着色,但文件的尺寸始终没有超过3K。与 TweenLite 的做法相似,提供有AS2版和AS3版的类包下载。
TweenMax 比 TweenFilterLite 增加了更多的特性,包含 bezier 缓动,暂停/恢复,顺序执行等等。(见 www.TweenMax.com)
我猜你会想“如果这个是‘轻量级的’,那么它一定会丢掉很多特性,让我用的时候会有点担心”。这种想法是对的,在这里缺少一些其它缓动引擎所包含的特效,但是我可以肯定的说,在过去几年我的工程(很多获奖的 flash 程序以及500强企业的项目中)中,我几乎一直都在用它,而它从没有让我失望过。
我还真没发现过我还需要其它的功能。你可以对任何的属性(包括 DisplayObject 对象的音量和颜色)使用缓动函数,内置的延迟时间,回调函数,以及传递参数给这些回调函数,甚至根据数组进行缓动,统统只在一行代码中完成。如果你需要更多的特效,你可以装上TweenFilterLite 或者 TweenMax来用用。
我也从来没有发现比这个更快的引擎。不同引擎执行效率的比较,请访问 http://blog.greensock.com/tweeing-speed-test/.

TweenLite参数说明:
1) $target : Object – 作为目标的对象, MovieClip或者其它对象
2) $duration : Number – 动画的时间长度(单位:秒)
3) $vars : Object – 对象,通过属性值,来存贮各种属性参数用于缓动。(如果你使用 TweenLite.from() 方法,这里的参数表示缓动的初始值)
该对象所具有的属性:
alpha: alpha 目标对象应该完成 (或开始,当使用 TweenLite.from()时)的透明度级别.如果 target.alpha 是1,当缓动被执行的时候,你指定参数为 0.5,它将把透明度从 1 缓动到 0.5.
x: 改变 MovieClip的 x 位置,把这个值设置成你希望的 MovieClip 的结束位置(如果你使用的是 TweenLite.from()这个值表示开始位置).
           ( y scaleX scaleY rotation 等属性不再重复说明)
特别的属性 (**可选的**):
delay : Number – 延迟缓动 (以秒为单位).
ease : Function – 缓动函数. 例如,fl.motion.easing.Elastic.easeOut 函数。默认的是 Regular.easeOut函数。
easeParams : Array – 用来存贮缓动公式所需要的额外数据. 当使用 Elastic 公式并且希望控制一些额外的参数,比如放大系数和缓动时间。大多数的缓动公式是不需要参数的,因此,你不需要给其它的缓动公式传递参数。
autoAlpha : Number – 用它来代替 alpha 属性,可以获得一些副加的效果,比如当 alpha 值缓动到 0时,自动将 visible 属性改为 false。当缓动开始前,autoAlpha 大于 0时,它将会把 visible 属性变成 true 。
visible : Boolean – 在缓动结束时,想要指定 DisplayObject 的 visible 属性,请使用这个参数。
volume : Number – 对 soundTransform (MovieClip/SoundChannel/NetStream 等)对象中的volume属性(音量大小)进行缓动
tint : Number – 改变 DisplayObject 的颜色,设置一个16进制颜色值之后,当缓动结束时,目标对象将被变成这个颜色,(如果使用的是TweenLite.from(),这个值将表示目标对象开始缓动时的颜色)。举个例子,颜色值可以设定为: 0xFF0000。
removeTint : Boolean – 要移除 DisplayObject 颜色,将这个参数设成 true 。
frame : Number – 将 MovieClip 缓动到指帧频。
onStart : Function – 在缓动开始时想要执行某个函数,就将函数的引用(通常是函数名)放到这里。如果缓动是带延迟的,那么在缓动开始前该函数不会被执行。
onStartParams : Array – 为缓动开始时要执行的函数传递参数。(可选的)
onUpdate : Function – 缓动过程中,每次更新时调用这里指定的函数(缓动开始后,每一帧被触发一次),
onUpdateParams : Array – 给 onUpdate 参数指定的函数传递参数 (可选的)
onComplete : Function – 缓动结束时执行的函数。
onCompleteParams : Array – 给 onComplete 参数指定的函数传递参数 (可选的)
persist : Boolean – 值为 true 时,TweenLite 实例将不会自动被系统的垃圾收集器给收走。但是当新的缓动出现时,它还是会被重写(overwritten)默认值为 false.
renderOnStart : Boolean – 如果你使用带有延迟缓动的 TweenFilterLite.from() ,并且阻止缓动的渲染(rendering )效果,直到缓动真正开始,将这个值设为 true.默认情况下该值为 false ,这会让渲染效果立即被执行,甚至是在延迟的时间还没到之前。
overwrite : int – 当前的缓动被创建以后,通过这个参数可以限制作用于同一个对象的其它缓动,可选的参数值有:
- 0 (没有): 没有缓动被重写。这种模式下,运行速度是最快的,但是需要注意避免创建一些控制相同属性的缓动,否则这些缓动效果间将出现冲突。
- 1 (全部): (这是默认值,除非 OverwriteManager.init() 被调用过)对于同一对象的所有缓动在创建时将会被完全的覆盖掉。
TweenLite.to(mc, 1, {x:100, y:200});
TweenLite.to(mc, 1, {x:300, delay:2}); //后创建的缓动将会覆盖掉先前创建的缓动,(可以起到这样的作用:缓动进行到一半时被中断,执行新的缓动 译者注)
- 2 (自动): (当 OverwriteManager.init() 被执行后,会根据具体的属性值进行选择)只覆盖对同一属性的缓动。
TweenLite.to(mc, 1, {x:100, y:200});
TweenLite.to(mc, 1, {x:300}); //only “x” 属性的缓动将被覆盖
- 3 (同时发生): 缓动开始时,覆盖全部的缓动。
TweenLite.to(mc, 1, {x:100, y:200});
TweenLite.to(mc, 1, {x:300, delay:2}); //不会覆盖先前的缓动,因为每二个缓动开始时,第一个缓动已经结束了。

举例:
将实例名为 “clip_mc” 的 MovieClip 透明度降到 50% (0.5) ,并将它 x 轴位置移动到 120 ,将音量将到 0,缓动总共用时 1.5 秒,代码如下:
import gs.TweenLite;
TweenLite.to(clip_mc, 1.5, {alpha:0.5, x:120, volume:0});

如果希望使用更高级的缓动函数在 5 内,将 alpha 变到 0.5,将 x 移动 到 120 ,使用 “easeOutBack” 弹性函数,缓动整体延迟 2 秒发生,并且在缓动结束时,执行 “onFinishTween” 函数,并且为这个函数传递几个参数,(一个数值 5 以及对 clip_mc 的引用),代码如下:
import gs.TweenLite;
import fl.motion.easing.Back;
TweenLite.to(clip_mc, 5, {alpha:0.5, x:120, ease:Back.easeOut, delay:2, onComplete: onFinishTween, onCompleteParams:[5, clip_mc]});
function onFinishTween(argument1:Number, argument2:MovieClip):void {
trace(“The tween has finished! argument1 = ” + argument1 + “, and argument2 = ” + argument2);
}

如果你的舞台上的 MovieClip 已经停在了它的结束位置,你只想让它花上5秒种回到这个位置,(只需要改变 y 属性,比当前位置高 100 像素的位置,让它从那里下落), 代码如下(这次使用的是 TweenLite.from 译者注):
import gs.TweenLite;
import fl.motion.easing.Elastic;
TweenLite.from(clip_mc, 5, {y:”-100″, ease:Elastic.easeOut});

说明:
- TweenLite类会让你的 Flash 文件增加 3kb大小。
- 给参数值加上引号,表示对指定的属性进行相应操作。比如,使用 TweenLite.to(mc, 2, {x:”-20″}); 它将 mc.x 向左移动 20 像素,与此相同效果的代码是:TweenLite.to(mc, 2, {x:mc.x – 20});
- 你可以用别的缓动函数替换 TweenLite 默认的缓动函数: Regular.easeOut.
- 必须使用 Flash Player 9 或之后版本的播放器 (ActionScript 3.0)
- 可以对任何 MovieClip 使用 “volume” 缓动,就比如:TweenLite.to(myClip_mc, 1.5, {volume:0});
- 可以将 MovieClip 设定成某种颜色,使用 “tint” 参数,比如: TweenLite.to(myClip_mc, 1.5, {tint:0xFF0000});
- 想要对数组内容进行缓动,将数值放到一个叫 endArray 的数组中即可,例如:
var myArray:Array = [1,2,3,4];
TweenLite.to(myArray, 1.5, {endArray:[10,20,30,40]});
- 可以在任何时候终止缓动,使用 TweenLite.killTweensOf(myClip_mc); 函数。如果想强制终止缓动,可以传递一个 true 做为第二个参数,比如
TweenLite.killTweensOf(myClip_mc, true);
- 取掉延迟回调函数,用 TweenLite.killDelayedCallsTo(myFunction_func);这项功能可以用来控制回调函数的优先级。
- 使用 TweenLite.from() 方法,可以使用对象从别的位置回到当前的位置。例如,你可以将对象在舞台上摆放整齐(缓动结束时的位置),然后利用
缓动,让它们跑到那个位置上去,你可以将缓动的初始位置值 x 或 y 或 alpha (或者其它你需要的属性)当做参数传递给这个方法函数。

TweenLite 下载链接:
http://www.greensock.com/ActionS … S3/TweenLiteAS3.zip
下载下来的类包中,有一个 TweenLiteAS3_Sample_1.swf ,初学者可以用它来观察各种缓动的效果,并且直接得到相关的执行代码。算是一个可视化设计的工具,不要错过。
下载到类包以后,解压缩到一个目录比如:d:\AS3Class ,在flash9 的首选参数->ActionScript->ActionScript3.0设置中添加类目录,d:\AS3Class\TweenLiteAS3 即可正确引用到相关的类。

应用举例:
import gs.TweenLite;
import gs.easing.*;

stage.addEventListener(MouseEvent.CLICK, onCK);
function onCK(evt) {
TweenLite.to(mc, 0.5, {x:mouseX, y:mouseY, rotation:360});
}
在舞台上点击,会让mc 元件旋转并跑动到鼠标位置。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值