【问题标题】:tweening two properties in Flash在 Flash 中补间两个属性
【发布时间】:2011-10-23 20:17:49
【问题描述】:

我用它来补间许多参数

        var tween:Tween = new Tween(imageObject, "x", Regular.easeIn, imageObject.x,nextImageObject.x-imageStep, 1, true);
        var tween1:Tween = new Tween(imageObject, "rotationY" , Regular.easeIn, imageObject.rotationY, rotationAngle,1, true);
        var tween2:Tween = new Tween(imageObject, "z" , Regular.easeIn, imageObject.z, newWidth,1, true);
        var tween3:Tween = new Tween(imageObject, "height", Regular.easeIn, imageObject.height, imageHeightAtEgde, 1, true);
        var tween4:Tween = new Tween(imageObject, "width", Regular.easeIn, imageObject.width,newWidth,1,true);

我想一起运行这个补间。有没有很多“干净”的方法可以做到这一点而没有很多补间?

【问题讨论】:

    标签: flash actionscript-3 tween


    【解决方案1】:

    首先,社区中的每个人都建议避开默认的 ActionScript Tweening 引擎。这就是 Adob​​e 基本上停止改进它的原因。有更好的补间引擎。

    我建议调查TweenLite。它有很多功能,而不是像在您的示例中那样为参数创建多个补间,而是通过您想要补间的参数传入补间对象,如下所示:

    TweenLite.to(imageObject, 1, {x: nextImageObject.x-imageStep, rotationY: rotationAngle, z: newWidth, width: newWidth, height:imageHeightAtEgde});
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-01
      • 2022-08-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多