0

我用过这段代码:

TweenMax.to(myButton, 2, {scaleX:1.5, scaleY:1.5, ease:Elastic.easeOut});

为了让一个对象展开,我有来自http://www.greensock.com/tweenmax/的代码,但我希望如果我再次单击该对象,它会反转我应该这样做:

var myTween:TweenMax = new TweenMax(movieclip1, 3, {y:200, repeat:2,  repeatDelay:1, onComplete:myFunction});

movieclip1.addEventListener(MouseEvent.CLICK, reverse); // Add the button click

function reverse(e:MouseEvent):void {

TweenMax.reverse();}

但我得到一个错误

4

1 回答 1

0

您必须在补间实例上调用它 -

myTween.reverse();

于 2013-11-04T21:10:23.240 回答