[HTC Desire, android 2.2., FP10.1.95.2] TransformGestureEvent.GESTURE_SWIPE not working
Hi,
I am reviewing new features of the player and I've made few examples from documentation, latter is about TransformGestureEvent.GESTURE_SWIPE, but I can't get it to work on my HTC desire. Question is does those features are not working in the browser?
http://greladesign.com/battlefield/fp10.1_transformgestureevent_swipe/
above example doesn't work:(
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.TransformGestureEvent;
import flash.text.TextField;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
/**
* ...
* @author Lukasz 'Severiaan' Grela
*/
public class Main extends Sprite
{
protected var mySprite:Sprite;
protected var myTextField:TextField;
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
Multitouch.inputMode = MultitouchInputMode.GESTURE;
mySprite = new Sprite();
mySprite.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
mySprite.graphics.beginFill(0x336699);
mySprite.graphics.drawRect(0, 0, 300, 200);
myTextField = new TextField();
myTextField.y = 200;
myTextField.border = true;
addChild(myTextField);
addChild(mySprite);
}
protected function onSwipe(evt:TransformGestureEvent):void
{
if (evt.offsetX == 1 )
{
myTextField.text = "right";
}
if (evt.offsetY == -1)
{
myTextField.text = "up";
}
myTextField.text = evt.phase;
}
}
}
the same issue is with rotate gesture
http://greladesign.com/battlefield/fp10.1_gesture_phase_01/
best regards