Loading multiple images with javascript
问题 I am strugling to create a script to load multiple images for a game drawn on Canvas. The window seems to load without completing the load of all images. I've tried many ways but none of them seems to work. The function drawGameMenu() is called before the images are actually loaded and so the images are not drawn. If someone could help, I would be grateful. Here is my script, kind regards: var imageNames = ["menuImage", "resetScoreButton", "instructionsButton", "playButton", "dialogPanel",