0
help me with event name ?
i have created 2 (up and down ) button using html button tag . using onclick button it moves 5px on each click. but i want untill the button is pressed it keeps moving . suggest the js event name . i have try with (keypress ,mousedown ) but these events are related to keyboard and mouse hense not working.
5 Réponses
+ 3
Divya Mohan
Here is the fully working one:
(just editing Rithea Sreng's solution)
https://code.sololearn.com/WDUr7E0jdP1O/?ref=app
0
https://code.sololearn.com/WjAktOXV3Yd2/?ref=app
0
https://stackoverflow.com/questions/36312150/mousedown-event-not-firing-on-tablet-mobile-html5-canvas#:~:text=To%20get%20your%20game%20working,Replace%20every%20instance%20of%20event.
May be this is the problem