Comments (10)
@mhr1019
check here https://github.com/fljot/GestouchExamples/blob/master/src/org/gestouch/examples/views/TransformGestureView.mxml
from gestouch.
thanks but i want to use it in flash cs6 !!
is it possible???? :/
how??
from gestouch.
@mhr1019
yeah, possible. What seems to be impossible? See how gesture is created, how event handlers added and stuff? All same ActionScript.
from gestouch.
thank a lott @fljot
i wrote this code and i can drag the map (movieclip) but i can't zoom or rotate it. :(
Code:
import org.gestouch.events.GestureEvent;
import org.gestouch.gestures.TransformGesture;
var transformGesture:TransformGesture;
transformGesture = new TransformGesture(map);
transformGesture.addEventListener(org.gestouch.events.GestureEvent.GESTURE_BEGAN, onGesture);
transformGesture.addEventListener(org.gestouch.events.GestureEvent.GESTURE_CHANGED, onGesture);
function onGesture(event:org.gestouch.events.GestureEvent):void
{
var gesture:TransformGesture = event.target as TransformGesture;
var matrix:Matrix = map.transform.matrix;
matrix.translate(gesture.offsetX, gesture.offsetY);
map.transform.matrix = matrix;
if (gesture.scale != 1 || gesture.rotation != 0)
{
// Scale and rotation.
var transformPoint:Point = matrix.transformPoint(map.globalToLocal(gesture.location));
matrix.translate(-transformPoint.x, -transformPoint.y);
matrix.rotate(gesture.rotation);
matrix.scale(gesture.scale, gesture.scale);
matrix.translate(transformPoint.x, transformPoint.y);
map.transform.matrix = matrix;
}
}
from gestouch.
@mhr1019
apparently gesture doesn't receive 2nd touch. Given the fact that you had questions and dealing with Flash CS – I guess you might be using some Adobe simulator with their "gestures"?
from gestouch.
thanks @fljot
i have a touch frame on my monitor and i have not using any simulator. you mean i can't drag(single touch) and zoom (multi touch) with this code? :(
from gestouch.
if you send me a source (.fla) file that can deal with all i want (drag,zoom,rotate with touch) I think the problem will be solved.
thanks
from gestouch.
@mhr1019
I don't have Flash CS to work with fla files.
Try to compile against sources, use this branch https://github.com/fljot/Gestouch/tree/features/71-fix-initialization
- You will need to configure conditional compilation (google it) with
-define+=CONFIG::GestouchDebug,true
to see bunch of logs which will help to understand what happens - There are small changes in this branch regarding configuration/initialization. see here https://github.com/fljot/Gestouch/blob/features/71-fix-initialization/CHANGELOG.md
Most likely flash runtime doesn't understand that you can receive touch events, therefore Gestouch input part doesn't even listen to those. But this is configurable, no worries.
from gestouch.
thanks @fljot
i'm sorry but i'm a beginner and i don't understand what you saying.
can you explain that step by step and tell me what have to do exactly?
my app is most be in adobe flash CS6 and work with gestouch
please help me :(((
from gestouch.
@mhr1019
these are all basics. I can't afford wasting time on teaching you that, sorry. Learn something yourself or hire person to teach you or do the job.
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
- 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.