【问题标题】:How to apply tranition to a left align element?如何将过渡应用于左对齐元素?
【发布时间】:2014-08-30 15:06:17
【问题描述】:

我的项目有一个向右对齐的面板:

<s:BorderContainer id="panelRight" right="0" top="60" bottom="30" width="333">

当我执行该代码时

move.target = panelRight;
move.xBy = +panelRight.width;
move.play();

什么都没有发生:这是因为 panelRighti 向右对齐!

我该如何解决?

【问题讨论】:

    标签: actionscript-3 apache-flex flex4 flex3


    【解决方案1】:

    您可以使用Animate 类而不是Move 并为x 而不是right 属性添加效果。它看起来像:

    var moveEffect:Animate = new Animate();
    moveEffect.target = panelRight;
    moveEffect.motionPaths = Vector.<MotionPath>([new SimpleMotionPath("right", null, null, -panelRight.width)]);
    moveEffect.play();
    

    效果看起来一样。

    Animate class

    【讨论】:

      猜你喜欢
      • 2021-04-26
      • 2012-07-03
      • 1970-01-01
      • 1970-01-01
      • 2012-11-28
      • 2015-12-28
      • 1970-01-01
      • 1970-01-01
      • 2021-07-23
      相关资源
      最近更新 更多