Tuesday, February 28, 2012

StageText and SkinnablePopupContainer

After much head scratching, I discovered that on the mobile AIR SDK, that TextInput wraps StageText. This is cool, because we can use native keyboard handling. But you have to watch out, if you create a popup, you could have your stage text on top of your popup. The solution - ensure that all popups extend SkinnablePopupContainer, and life is easy. Of course this is what Adobe recommends, but to my knowledge they didn't say why. :)

If you are creating custom popups and/or using external libraries make sure you can verify the object hierarchy and that SkinnablePopupContainer is there.

I write this because I found a mobile UI library that I was playing with and it didn't, and I had to spend time debugging. Since the search results did not provide and obvious solution, hopefully this post helps someone else if they come across the issue where the TextInput is always on top regardless of the z-order depth.  

No comments:

Post a Comment