Author Topic: Query on Tweens  (Read 5869 times)

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Query on Tweens
« on: March 12, 2014, 10:30:50 AM »
Hi all, is there any way that I can tell what state a Tween is in when the OnFinished event is fired. I am using one to control a pop-up menu of sorts. Whether I 'open' or 'close' the menu the OnFinished fires, but how can I tell whether the menu is open(ing) or closed(closing)?

thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Query on Tweens
« Reply #1 on: March 12, 2014, 06:42:36 PM »
Check UITweener.current.amountPerDelta -- it will be negative if you were playing it in reverse, positive if you were playing it forward.

Or better yet, check UITweener.current.tweenFactor -- it will be 0 if you're at the start, 1 if you're at the end.

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Query on Tweens
« Reply #2 on: March 12, 2014, 06:44:25 PM »
Cool thanks  :)