+ 1
I can't move "the man"[SOLVED]
I wanna make a game which when you click the for example right button "the man"(blue rectangle) will move in this way. Can you help me https://code.sololearn.com/WH1mn0fy3BX0/?ref=app
6 Antworten
+ 5
Oh a downvote proved I'm stupid, sorry 😅
+ 2
You are never calling the `right` function. Add this line anywhere outside the function
window.onload = right
This will call the right function as soon as the document loads and then you can use the "right" button.
Note that when you add functionality for other buttons, add it in the right function only (probably rename it), becase only the `right` function will be called when the document loads
+ 2
_mustafa_ .carbas. Here is an example based on your code:
https://code.sololearn.com/W3e480HDncyc/?ref=app
+ 1
I have done one right button for you
Try for other three yourself.
And first closer your div#container.
https://code.sololearn.com/WBiNPXEFcXco/?ref=app
0
Thanks everyone! problem solved
0
_mustafa_ .carbas. What about accidently selecting the screen?
here
https://code.sololearn.com/W0VX1XT5mD5G/?ref=app