Skip to main content
Inspiring
Nov 7, 2022 11:44 PM UTC
Question

Adobe animate CC html5 canvas player movement

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

JoãoCésar17023019
Community Expert
Community Expert
Nov 8, 2022 10:12 AM UTC

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

Translate
kglad
Community Expert
Community Expert
Nov 8, 2022 1:22 AM UTC

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

Translate