Author Topic: Stopping A Tween  (Read 1143 times)

vexir

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 47
    • View Profile
Stopping A Tween
« on: December 12, 2013, 05:21:05 PM »
Hey there,

I have a simple set of two TweenAlpha's on an object - one goes from 0 to 1 (Enter), the other from 1 to 0 (Exit). I have code that says Reset() -> Play() on each one in sequence, so that the object fades in, stays on screen for a bit, then fades out.

I'm having trouble interrupting the sequence. I thought I could just call .Reset() on the Enter TweenAlpha, which would reset it to 0, but that doesn't seem to have any effect. I'm guessing I need to also stop them from playing, but I don't see a Stop() to match the Play().

How can I interrupt a tween?

Vexir

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,763
    • View Profile
Re: Stopping A Tween
« Reply #1 on: December 12, 2013, 07:17:42 PM »
You can disable the component.

  1. tweenReference.enabled = false;