Skip to main content
Inspiring
November 7, 2022
Question

Adobe animate CC html5 canvas player movement

  • November 7, 2022
  • 2 replies
  • 197 views

Hi team,

I am a teacher and am using adobe animate - but I am trying to wrap my head around the html5 canvas instead of using actionscript3.  Can anyone point me towards a simple tutorial or some code to get a drawn object (Movieclip) with an instance name to move with the A, S, W, D keys?   

Ideally I would like a car or something that moves forward/backwards on the W and S keys and then A and D keys can change the angle.

Any help or even a bit of pasted code would be really greatly appreciated (while we cant come up with it ourselves we will be able to break, change and modify it once we have a working model)

Thanks again and have a great day

This topic has been closed for replies.

2 replies

JoãoCésar17023019
Community Expert
Community Expert
November 8, 2022

Hi.

 

I have a couple of samples here:
https://github.com/joao-cesar/adobe/tree/master/animate%20cc/html5_canvas/move_char_using_keys

 

I hope it helps.

 

Regards,

JC

kglad
Community Expert
Community Expert
November 8, 2022

use the ticker to determine if a key was pressed, and if so, which.