Comments (11)
First of all let's ensure we're talking about the same version, so go and grab the sources from this commit
4398712
from gestouch.
Thanks for the quick reply!
I switched from the swc to the latest src, and then merged in your two changes from 4398712.
Sadly, I still see fail states. Here is how I'm detecting them:
public function onSCMouseMove(event:GestureEvent):void {
trace("[SceneStage] onSCMouseMove:", event.oldState + "->" + event.newState);
if (event.oldState == GestureState.FAILED)
{
trace("[SceneStage] onSCMouseMove() - Gesture state: FAIL");
}
Some output:
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.IDLE
[SceneStage] onSCMouseMove: GestureState.IDLE->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
[SceneStage] onSCMouseMove: GestureState.BEGAN->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.IDLE
[SceneStage] onSCMouseMove: GestureState.IDLE->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.FAILED
[SceneStage] onSCMouseMove: GestureState.FAILED->GestureState.IDLE
[SceneStage] onSCMouseMove() - Gesture state: FAIL
from gestouch.
Check the project settings again because there's no more IDLE anymore.
https://github.com/fljot/Gestouch/blob/4398712f0c5b704818457bf120193157bd09dfdb/src/org/gestouch/core/GestureState.as
from gestouch.
So, with the recent version, show me the stacktrace once it fails:
if (event.newState == GestureState.FAILED)
{
trace("failed:", (new Error()).getStackTrace());
}
and did I get you right — it fails while you're moving?
from gestouch.
Found the "develop" branch and I'm now using that -- master still has idle for me for some reason.
Also found that I needed to convert to GESTURE_RECOGNIZED in a few cases where I was using something else. Seems like you cleaned some things up, and I wasn't getting a location coordinate for the event state I was previously using.
Onward:
Here is the behavior I'm using to repro:
click -> release // (to select an object to transform)
clickhold ->drag ->release // moves an object
clickhold ->drag ->release // move here
clickhold ->drag ->release // move there
clickhold ->drag ->release // move somewhere else
clickhold ->drag // FAIL
The fail happens before the move -- the object stays put / the cursor moves without it.
Here's the latest trace with your code:
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
[SceneStage] onSCMouseMove: GestureState.BEGAN->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
[SceneStage] onSCMouseMove: GestureState.BEGAN->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.FAILED
failed: Error
at com.storytime.creator::SceneStage/onSCMouseMove()[client\src\com\storytime\creator\SceneStage.as:745]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.gestouch.gestures::Gesture/setState()[client\src\org\gestouch\gestures\Gesture.as:577]
at org.gestouch.gestures::Gesture/org.gestouch.core::gestouch_internal::setState_internal()[client\src\org\gestouch\gestures\Gesture.as:598]
at org.gestouch.core::GesturesManager/org.gestouch.core::gestouch_internal::onGestureRecognized()[client\src\org\gestouch\core\GesturesManager.as:186]
at org.gestouch.gestures::Gesture/setState()[client\src\org\gestouch\gestures\Gesture.as:589]
at org.gestouch.gestures::SwipeGesture/onTouchMove()[client\src\org\gestouch\gestures\SwipeGesture.as:241]
at org.gestouch.gestures::Gesture/org.gestouch.core::gestouch_internal::touchMoveHandler()[client\src\org\gestouch\gestures\Gesture.as:657]
at org.gestouch.core::GesturesManager/org.gestouch.core::gestouch_internal::onTouchMove()[client\src\org\gestouch\core\GesturesManager.as:284]
at org.gestouch.core::TouchesManager/org.gestouch.core::gestouch_internal::onTouchMove()[client\src\org\gestouch\core\TouchesManager.as:170]
at org.gestouch.input::NativeInputAdapter/mouseMoveHandler()[client\src\org\gestouch\input\NativeInputAdapter.as:205]
[SceneStage] onSCMouseMove: GestureState.FAILED->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
While still seemingly random, the fail state happens quite easily in my case. I'd be happy to skype-screen-share with you to show you first hand if that helps.
Thanks for your support. :)
from gestouch.
Well the log says that:
- First you stop TransformGesture (dragging) via releasing the touch.
- Then you attempt to do it (pan/transform) again, but another gesture (Swipe) is recognized therefore your TransformGesture fails.
my skype is fljot_
from gestouch.
Ugh - good call. I had a swipe gesture in there from an old test that was interfering. Thanks so much for helping to troubleshoot that.
Question - should I go back to the gestouch swc I was using, or do you think it's best to stay with the dev branch?
from gestouch.
I'd say this commit from develop branch has nothing experimental and I should actually make a release out of it or maybe a bit later.. so I'd say go with it.
But for me it's still a bit unclear how would swipe be recognized first.. only if it was deeper than transform?
from gestouch.
Yes - swipe was initialized after the transform was initialized. Is it more standard to do it before?
I think I'm having a similar issue with double-tap -- the transform is listened to first, so it makes it more difficult to successfully make a double-tap happen.
Thanks again for your support here.
from gestouch.
Transform and double-tap should not conflict due to different nature — you don't move your finger (much) when tapping. Well you have my skype.. because it sounds a bit weird what you say)
from gestouch.
It's pretty sensitive on my ipad3 -- difficult to get my double-tap context menu to show without moving the object via the Transform Gesture. I was thinking about doing some "this cancels that" logic, but I'm not at that point yet. I added you on skype -- would be happy to show you the repro :)
from gestouch.
Related Issues (20)
- Limit panning in TransformGesture HOT 2
- DoubleTab and zoom HOT 3
- use Gestouch in Normal As3 HOT 1
- Gestouch suddenly stopped working on Windows 10 with latest Animate CC HOT 2
- How can I use gestouch in starling2 and normal swf file with together ? HOT 1
- freerotation behaviour HOT 4
- SwipeGesture and Drag Drop HOT 1
- swipe container and tap with button scaling up HOT 19
- air error HOT 6
- Errors when using swipe gesture with Starling HOT 2
- Starling.dispose() loses Gestouch swipe HOT 3
- Gestouch with Air18 HOT 8
- Gestouch suddenly stops working HOT 7
- Cannot register CLICK events on items inside an item dragged with Gestouch HOT 2
- example for drag and zoom and rotate. all together with gestouch HOT 10
- Listeners not working in certain circumstances HOT 15
- SingleTap and DoubleTap - suggestions? HOT 3
- TUIO and Starling HOT 2
- Shaky TransformGesture HOT 5
- Dispatch SwipeGesture to repeat Event HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gestouch.