• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to pinch to zoom multiple objects separately?

Community Expert ,
Sep 22, 2017 Sep 22, 2017

Copy link to clipboard

Copied

Hi!

I'm developing an application for an interactive table running Windows 10 that has a menu with five buttons. Each button calls a popup window.

Each user should be able to pan and zoom his or her own window. All users panning and zooming all windows at the same time.

My problem is that when I use the simulator inside of Animate CC I can only pinch to zoom only one window. Even if I made the gesture above another window the scaling only applies to one of the windows.

I tried, inside of the handler function, using event.target and event.currentTarget but the result is the same.

What should I do?

TOPICS
ActionScript

Views

663

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 22, 2017 Sep 22, 2017

Copy link to clipboard

Copied

Part of this could be your touch monitor. The HP TouchSmart I use at work, for instance, only sees two touch points - so only one person would be able to pinch zoom at a time... but maybe two people could drag an item. Different touch monitors support different numbers of points.

Also, I've had good luck in the past with this library:

GitHub - fljot/Gestouch: Gestouch: multitouch gesture recognition library for Flash (ActionScript) d...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2017 Sep 22, 2017

Copy link to clipboard

Copied

Hi, @dmennenoh!

Thank you for the answer.

The only way I have here to test on a real device is by running Windows 10 on an iPad Pro using Duet Display.

And strangely... it WORKED.

I don't understand why I can't get pinch to zoom on different objects using the simulator...

Anyway. It's working now. Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 22, 2017 Sep 22, 2017

Copy link to clipboard

Copied

LATEST

I would suspect the simulator only copes with two fingers. But the general answer is that you should be tracking touchid, not current target. I mean, you have the listener on the target in question, but to know that the update you are getting belongs to the object you're interested in, you store the touchid on press, and check the touchid on any move event. Only pinch or zoom the object if the move event has the right touchid.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines