Comments (9)
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.
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.
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.
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.
Maybe like this,
doubleTap.addEventListener(GestureEvent.GESTURE_RECOGNIZED, onDoubleTap);
function onDoubleTap(event:GestureEvent):void { }
from gestouch.
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.
@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.
?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.
james, may i see what you did for pinch zoom gesture? thank you
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.