Giter Club home page Giter Club logo

Comments (10)

fljot avatar fljot commented on July 28, 2024

@mhr1019
check here https://github.com/fljot/GestouchExamples/blob/master/src/org/gestouch/examples/views/TransformGestureView.mxml

from gestouch.

mhr1019 avatar mhr1019 commented on July 28, 2024

thanks but i want to use it in flash cs6 !!
is it possible???? :/
how??

from gestouch.

fljot avatar fljot commented on July 28, 2024

@mhr1019
yeah, possible. What seems to be impossible? See how gesture is created, how event handlers added and stuff? All same ActionScript.

from gestouch.

mhr1019 avatar mhr1019 commented on July 28, 2024

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.

fljot avatar fljot commented on July 28, 2024

@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.

mhr1019 avatar mhr1019 commented on July 28, 2024

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.

mhr1019 avatar mhr1019 commented on July 28, 2024

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.

fljot avatar fljot commented on July 28, 2024

@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

  1. 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
  2. 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.

mhr1019 avatar mhr1019 commented on July 28, 2024

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.

fljot avatar fljot commented on July 28, 2024

@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)

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.