Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

ringo1988

Members
  • Posts

    3
  • Joined

  • Last visited

ringo1988's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. That's the code... var btn1TL:TimelineLite = new TimelineLite({paused:true}); btn1TL.appendMultiple([new TweenLite(btn1, 1, {alpha:0.5}), new TweenLite(btn1, 0.5, {x:"+100"})], 0, TweenAlign.SEQUENCE, 0); var buttonOffset:TimelineLite = new TimelineLite({paused:true}); buttonOffset.appendMultiple([new TweenLite(modelling, 0.3, {y:"-100"}), new TweenLite(btn1, 0.3, {y:"-100"}), new TweenLite(btn2, 0.3, {y:"-100"}), new TweenLite(btn3, 0.3, {y:"100"}), new TweenLite(btn4, 0.3, {y:"100", onComplete:PageStart})], 0, TweenAlign.START, 0); function PageStart():void { btn1.mouseEnabled = false; Page1TL.play(); } btn1.addEventlistener(MouseEvent.MOUSE_DOWN, btn1Down); function btn1Down(e:MouseEvent):void { buttonOffset.play(); } btn2.addEventlistener(MouseEvent.MOUSE_DOWN, btn2Down); function btn2Down(e:MouseEvent):void { buttonOffset.reverse(); } The problem is after clicking "btn2", it only reverses the timeline "Page1TL" but not both the timeline(buttonOffset and then Page1TL). Sorry for my poor English and hope someone can help me to solve the problem. Thanks
  2. Hi, I was trying to make some effect but it doesn't seem to be working that function rect2 wasn't executed. There's an array(rectangle[1], rectangle[2], ...)... this.stage.addEventListener(Event.ENTER_FRAME, rect1); function rect1(e.Event):void { rectangle[1].x = 0; TweenMax.to(rectangle[1], 1, {rotationZ:-180, onComplete:rect2}); } function rect2() { rectangle[2].x = 50; TweenMax.to(rectangle[2], 1, {rotationZ:-180}); } If I replace onComplete with onUpdate, the rectangle[2] will be displayed, but what I wanted was rectangle[2] was created after rectangle[1] finished rotating. Is there any conflict between Tweenmax's onComplete and event listener?
×