Giter Club home page Giter Club logo

Comments (9)

thomaspaillot avatar thomaspaillot commented on September 2, 2024

Hi,

Download the source and copy the "org" folder in the same folder than your .fla file. That's it, now you can use the example provided in the README file.

from gestouch.

yelle77 avatar yelle77 commented on September 2, 2024

Thats exactly what i did but when testing i keep getting errors such as

Scene 1, Layer 'actions', Frame 1, Line 45 1180: Call to a possibly undefined method TapGesture.
Scene 1, Layer 'actions', Frame 1, Line 45 1046: Type was not found or was not a compile-time constant: TapGesture.

My code reads

...

var doubleTap:TapGesture = new TapGesture(spinX_mc);
doubleTap.numTapsRequired = 2;
doubleTap.addEventListener(org.gestouch.events.GestureEvent.GESTURE_RECOGNIZED, onDoubleTap);

function onDoubleTap(event:org.gestouch.events.GestureEvent):void
{
if (spinX_mc.scaleX == 2 && spinX_mc.visible == true)
{
spinX_mc.scaleX *= 1;
spinX_mc.scaleY *= 1;
}
else
{
spinX_mc.scaleX *= 2;
spinX_mc.scaleY *= 2
}
}

from gestouch.

thomaspaillot avatar thomaspaillot commented on September 2, 2024

You have to import classes you use in the beginning of your file, like this :

import org.gestouch.gestures.TapGestures;
import org.gestouch.events.GestureEvent;

from gestouch.

yelle77 avatar yelle77 commented on September 2, 2024

Scene 1, Layer 'actions', Frame 1, Line 70 1180: Call to a possibly undefined method TapGesture.
Scene 1, Layer 'actions', Frame 1, Line 17 1172: Definition org.gestouch.gestures:TapGestures could not be found.
Scene 1, Layer 'actions', Frame 1, Line 70 1180: Call to a possibly undefined method TapGesture.

Now i get this? ...ummm may have to think of another solution as on a tight deadline.

from gestouch.

thomaspaillot avatar thomaspaillot commented on September 2, 2024

Maybe like this,

doubleTap.addEventListener(GestureEvent.GESTURE_RECOGNIZED, onDoubleTap);

function onDoubleTap(event:GestureEvent):void { }

from gestouch.

 avatar commented on September 2, 2024

Here is what I did. Created a button instance called my button and a dynamic text field called display.

Imported all the classes.

Put the full path to the gesture recognized event.

Not sure why I have to put the full path to the event. If any one can explain this it would be helpful to my learning.
import org.gestouch.core.*
import org.gestouch.events.GestureEvent;
import org.gestouch.extensions.;
import org.gestouch.gestures.
;
import org.gestouch.input.*
import org.gestouch.utils.*

var doubleTap:TapGesture = new TapGesture(myButton);
doubleTap.numTapsRequired = 2;
doubleTap.addEventListener(org.gestouch.events.GestureEvent.GESTURE_RECOGNIZED, onDoubleTap);

function onDoubleTap(e:GestureEvent):void
{
display.text = "double tap: " + e;
}

from gestouch.

fljot avatar fljot commented on September 2, 2024

@jamesmfoley
Code on the frame? Because Flash has some shortcut to flash.events.GestureEvent and it confuses it with the actual class that you write import for. Same for MXML. Some native classes racism.

from gestouch.

 avatar commented on September 2, 2024

?I know I am lazy. I went through all the event and made example with Flash CS 6 if anyone would like them they all work. Will Adobe ever give access to Native Gesture and Touch Events?

Jim


From: Pavel Pevnitskiy [email protected]
Sent: February 13, 2015 12:23 AM
To: fljot/Gestouch
Cc: Jim Foley
Subject: Re: [Gestouch] How to set up in Flash CS6 (#54)

@jamesmfoleyhttps://github.com/jamesmfoley
Code on the frame? Because Flash has some shortcut to flash.events.GestureEvent and it confuses it with the actual class that you write import for. Same for MXML. Some native classes racism.

Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-74214846.

from gestouch.

tonybot3 avatar tonybot3 commented on September 2, 2024

james, may i see what you did for pinch zoom gesture? thank you

from gestouch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.