0

My name is Anubhav! I was developing a Arkanoid style game in AS3. And I am having some problems with the following TweenLite code :

TweenLite.to(costume, 1, {
    alpha: 0,
    y: posY,
    scaleX: 0,
    scaleY: 0,
    rotation: 30,
    onComplete: function() {
        dispatchEvent(new BrickEvent(BrickEvent.HIT_BALL));
    },
    overwrite: OverwriteManager.CONCURRENT
});

The above code is fired when a ball hits a brick (to animate the brick costume). The problem is that Tweenlite is just changing the alpha, scaleX and scaleY properties while y and rotation properties remain untouched. I tried using TweenMax and changing the overwrite options to NONE, ALLONSTART, ALLIMMEDIATE etc. but none of them is working. I have no idea why this is happening. Please help me out! :)

4

2 回答 2

0

哦,我发现了错误!我真是个傻瓜!实际上,我使用 Box2D 作为物理引擎来处理所涉及的碰撞,它并没有让我更改位置和旋转属性。无论如何,感谢马蒂亚斯的帮助!:)

于 2010-12-24T13:05:23.820 回答
0

这可能与球撞墙之前发生的动作有关。确保删除所有影响球的补间和其他动作。如果你用补间移动球,overwrite:true 应该处理它。您也可以使用 tweenLite.removeAllTweens(ball)。不确定这是否是正确的方法名称。

于 2010-12-24T09:10:29.977 回答