paintBox.addEventListener(‘mousedown’, () => {
player.speed = playerSpeed;
})
paintBox.addEventListener(‘mouseup’, () => {
player.speed = 0;
})
These mouse events are not generating any event
paintBox.addEventListener(‘mousedown’, () => {
player.speed = playerSpeed;
})
paintBox.addEventListener(‘mouseup’, () => {
player.speed = 0;
})
These mouse events are not generating any event
Hi @akashagarwal1321,
In the word “paintBox” please check the “B” needs to be in small and not in capital it is supposed to be “paintbox” rather “paintBox” if following convention used by sir in the lecture. In the other case please share your code file in the form of a Github repository link to get further assistance on it.
In case you want to review the script file used in the lecture please refer the attached link .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.