02-15-2011 12:29 PM
I will throw this out there, not to ask a question, but to just give a general warning to folks. I've discovered that my own application has this problem and suspect that others might as well..
If you are using tweeners in your application and handling an orientation change, you could have a big problem if that orientation change comes while a tweener is tweening. Fortunately, the tweener class has remove methods to cancel the tween, but it might still require some special coding to make them work right.
I'm still not sure if I'm going to try to fix this or not, but it's something to think about.
02-15-2011 12:33 PM
You can also queue the orientation changes and let the tweener finish and then process the next orientation change in the queue (if one exists). It all depends on what type of behavior you want the end user to experience and how long does it take to tween from one orientation to another.
02-15-2011 12:53 PM
Do you do this? Its not a bad idea actually. I'm assuming you'd have to start a thread which would wait for the tweeners to finish and then process the orientation change, or is there a better way that i'm missing?
I had figured that I would stop all tweens and try to recover from the unknown state. For me, this is somewhat of a problem because I tween objects off the screen and use the onComplete event to remove the item from the stage when the tween is done. Once the tween starts though, I let go of any other references so if I canceled the tween I would lose the object reference to remove it.
02-15-2011 01:16 PM
Not currently, but I plan to.