我使用过这段代码:
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();}
但是我收到了错误
答案 0 :(得分:0)
你必须在补间实例上调用它 -
myTween.reverse();