Author Topic: tweenalpha.toggle  (Read 2606 times)

ssc.mikey

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
tweenalpha.toggle
« on: March 10, 2014, 02:04:13 PM »
I have successfully tried to access alpha from my code by creating a UIWidget name; and change its value by name.alpha = 1f; and it all works but it creates me one problem as on click i notify a game object and call TweenAlpha.Toggle where i kind of fade out my sprite. When i change the alpha of my sprite from my code it gets back to 1 but when i click button and notify same object again it doesnt work properly as it fade in by itself. So i am looking for a way to run TweenAlpha.Toggle back to fade in so it works like you have clicked the same button again. Thank you in advice

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tweenalpha.toggle
« Reply #1 on: March 10, 2014, 08:09:58 PM »
If you need to fade out something, don't try to fade out something that has a button script attached. Fade out its parent -- such as a panel, or a parent widget.