destination-over or event listener problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

destination-over or event listener problem

the function.... base_bullet is displaying the bullets behind the drawn image...!!, I tired to fix this problem by adding the globalCompositeOperarion keyword but the results are still the same.... I also discovered that when I removed the window.addEvent..... with a "mousemove" event .. the black spot showed... but that is not what I want to achieve!!😞 I want the black dot to show where ever the user clicks on the screen 😔 https://code.sololearn.com/Wqau8KFPi41v/?ref=app

6th Nov 2020, 7:06 PM
LIONEL
LIONEL - avatar
5 Answers
+ 5
JaScript I don't understand what you did in the code... the amount of bugs even increaased 😲
7th Nov 2020, 10:04 AM
LIONEL
LIONEL - avatar
+ 3
This is corrected and some reworked code of your attempt. Try to touch the 🔵 and then somewhere else 😀 https://code.sololearn.com/Wts5kOV19Zjb/?ref=app
7th Nov 2020, 4:05 AM
JaScript
JaScript - avatar
+ 3
TONY(1 MAN ARMY) interesting, putting all together in the html file cancel the problems, thanks. And now L̷££ Y̷O̷O̷ N̷∆L̷E̷ , do you have any bugs?
7th Nov 2020, 11:04 AM
JaScript
JaScript - avatar
+ 2
L̷££ Y̷O̷O̷ N̷∆L̷E̷ That's unbelievable. Where do you see that? There is nothing special in the code and everything works fine for me on the iOS devices. Ok, I'm going to investigate this on my ms windows PC.
7th Nov 2020, 10:41 AM
JaScript
JaScript - avatar
+ 2
L̷££ Y̷O̷O̷ N̷∆L̷E̷ back to the second part of your question, what I done: so in your code you confuse the object properties with input parameters as well global and local variables. And the EventListener cannot resoectively should not to be repeated / animated. I would like to recommend you to overwork above mentioned topics for bette understanding. I.e. this tutorial can be helpful: https://www.w3schools.com/graphics/game_canvas.asp
7th Nov 2020, 2:17 PM
JaScript
JaScript - avatar