Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noob: Cant get get events firing. #63

Open
dejv opened this issue Feb 8, 2014 · 4 comments
Open

Noob: Cant get get events firing. #63

dejv opened this issue Feb 8, 2014 · 4 comments

Comments

@dejv
Copy link

dejv commented Feb 8, 2014

Hi, im quite the beginner of AS3, probably shouldnt post here but im reaching out in hope to understand how things work.

Im looking for good detection of a double tap gesture using Gestouch. Im working in Flash Pro CC (bad IDE I know) targeting iOS with AIR 4 and when testing my app I keep getting this:

"Scene 1, Layer 'Layer 1', Frame 1, Line 418, Column 42
1119: Access of possibly undefined property GESTURE_RECOGNIZED through a reference with static type Class." 

I'm not quite sure what that means. I've tried attaching the event to Sprites and Movieclips but no cigar. The line it's referring to is where I add the event listener.

code:

import org.gestouch.core.Gestouch;
import org.gestouch.gestures.TapGesture;
import org.gestouch.events.GestureEvent;

var doubleTap:TapGesture = new TapGesture(newMarker);
doubleTap.numTapsRequired = 2;
doubleTap.addEventListener(GestureEvent.GESTURE_RECOGNIZED, onDoubleTap);

function onDoubleTap(event:GestureEvent):void
{
    trace("double tapped");
}

Hope anyone can point me in the right direction!

@fljot
Copy link
Owner

fljot commented Feb 8, 2014

A quote from one of my e-mails:

A piece of a strong (STRONG) advice: don't use Flash CS for project compilation, and if you still do — don't write on the frames. The times of ActionScript1 have passed.
You have this problem because of some inner conflict with the flash.events.GestureEvent (same will happen in MXML), in this case the only solution is to write the whole package

addEventListener(org.gestouch.events.GestureEvent.GESTURE_RECOGNIZED, ...

handler(event:org.gestouch.events.GestureEvent):void

@fljot
Copy link
Owner

fljot commented Feb 8, 2014

I guess I have to write some FAQ, as the experience level of users is unexpectedly hmm various.

@dejv
Copy link
Author

dejv commented Feb 8, 2014

Thank you for the answer. I can see why that conflict would occur. I take it that is because the Flash IDE includes a bunch of stuff when compiling that another compiler would not?

And a FAQ would be great, as a wise man once said: "Anything that can go wrong — will go wrong." and as a human factors engineer, I have to say that that also includes user behavior.

Thanks for a great lib

@simonfossom
Copy link

Same problem. Didn't help me.

this is my first class where I initialze starling http://goo.gl/M4NTC8
this is my second class where I try to get tap to work http://goo.gl/m3dU06

Can you tell me if I've overlooked something?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants