Hey, I made a demo where I added keyboard events and used "A D W S" to control character movement, “role.x+=6 role.x-=6”, This is great on the computer side

Hey, I made a demo where I added keyboard events and used “A D W S” to control character movement, “role.x+=6 role.x-=6”, This is great on the computer side.

But what should I do on my phone? Because there is no keyboard event on the mobile phone? Is that using a mouse event? Or use touch events? Novice Questions

You can use either MouseEvent or TouchEvents. OpenFL automatically translates TouchEvents for the primary touch into MouseEvents. If you use MouseEvent, it will work with an actual mouse too. If you want it limited to touch only, then you must use TouchEvent.

On touch screens, you could add four buttons on the corner of the screen. When the user touches them, you could make them behave similar to WASD keys.

I am noting that the documentation for TouchEvent mentions GestureEvent, PressAndTapGestureEvent, and TransformGestureEvent classes which do not currently exist.

For the record, a while back I was needing multi-touch support for html5 target and ended up using the hammerjs library (externs for Hammer.js).

I need to use mouse events on the computer
Using touch events on mobile devices (single point and multi-point)
Do you need some mouse events or touch events?

Ah。 Doesn’t touch support multiple points?

Yes, it does. The touchPointID property of the TouchEvent may be used to differentiate between multiple touches.