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

Zoom and pan map movie using gestures in html5 canvas

Community Beginner ,
Jan 15, 2018 Jan 15, 2018

I need help with the code for zooming and panning an Animate CC movie html5 canvas using the touch gestures.

I have a movie containing a map. I need an example of code to be able to pinch / spread for zooming and drag to pan the map.

If possible I would also need the functions for mouse-wheel zooming and click to drag the map for alternative desktop interfaces.

Many thanks!

2.4K
Translate
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

correct answers 1 Correct answer

Participant , Jan 15, 2018 Jan 15, 2018

Hi Rogersub,

I usually use: Hammer.JS - Hammer.js

A quick tutorial here: HTML5 and Multitouch – Hammer.js | Creative droplets

If you don't want to use addon scripts, you have to look at the standard browser touch events.

Example here from firefox:Touch events - Web APIs | MDN

A quick tutorial here: https://www.html5rocks.com/en/mobile/touch/

Regards,

Translate
Participant ,
Jan 15, 2018 Jan 15, 2018

Hi Rogersub,

I usually use: Hammer.JS - Hammer.js

A quick tutorial here: HTML5 and Multitouch – Hammer.js | Creative droplets

If you don't want to use addon scripts, you have to look at the standard browser touch events.

Example here from firefox:Touch events - Web APIs | MDN

A quick tutorial here: https://www.html5rocks.com/en/mobile/touch/

Regards,

Translate
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 Beginner ,
Jan 16, 2018 Jan 16, 2018

Hi albertd9194959,

Thanks very much for your reply.

Do you have any examples on how to use hammer.js in Animate CC?

(the tutorial doesn't seem to work)

Thanks again.

Translate
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
Explorer ,
Jan 26, 2018 Jan 26, 2018
LATEST

Hey Roger have you figured out the gestures?

Translate
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