Pages

Sunday, April 14, 2013

NME Gesture Library

I was struggling with how to do gestures with NME . I need to do swipe control in my games but I can't found any good gesture library to use.
Then luckily I stumbled upon this roxlib library. it was after browsing through the haxe google group that I found a  thread about it. I tested it on my android and it works really well

it's a good library but really need documentation about how to use it.
I've figured out how it works and maybe will create some examples later.
currently it support pan, pinch , swipe, long press, tap, double tap, and some other's that I forgot. (well at least I can use the swipe :p )

the downside is it's need some sprite with graphic registered as the input listener so an empty sprite without anything inside would be no good. I use empty sprite as the input listener so this really troubles me. My solution is create a screen-sized transparent image as the graphic and add it to the sprite. it works well, but if there's any better solution maybe I'll try that.