Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Shorinji on July 10, 2012, 11:17:46 AM

Title: Strange behavior with Call When Finished
Post by: Shorinji on July 10, 2012, 11:17:46 AM
Hi,
I have a strange behavior with call when finished.
I have some panels whose animation can be played from different objects. On some object, i want to call a callback when animation is finished. On other object, i want nothing to happen when the animation is finished.
However in some cases ( i have not been able to determine yet a more precise definition of "in some cases", however i have a reproducible case), the callback will always be called no matter which object requested the animation to be played, as long as the callback has been called once.
To correct this issue, i added the following code line 172 of the file UIButtonPlayAnimation :
  1. else
  2. {
  3.     anim.eventReceiver = null;
  4.     anim.callWhenFinished = "";
  5. }
  6.  
I suspect that this issue might appear for your tweens too.
Can you please let me know if you have been able to reproduce this issue? Or if it is a normal behavior in your opinion?
Thanks in advance.
Title: Re: Strange behavior with Call When Finished
Post by: ArenMook on July 10, 2012, 06:05:29 PM
Sounds to me like it's one of those "who will ever use it like that?" issues. I'll add your fix.
Title: Re: Strange behavior with Call When Finished
Post by: Shorinji on July 10, 2012, 11:41:47 PM
Hi,
Yes, you will eventually have more and more of this kind of issues if your GUI is more and more successful.
If people report them, it's a good sign for you :D
Anyway thanks for your quick support.