p5.js says: It looks like there was a problem loading your image. Try checking if the file path [ http://www.adsmedia.pe/demos-publicidad/imagenes/super.png] is correct, hosting the image online, or running a local server.[ https://github.com/processing/p5.js/wiki/Local-server] p5.js:48242:7
Please somebody could help me with this, I have changed the path to relative and absolutes path and nothing works
I would suggest you download local server like live-server or browser-sync (they are all javascript lightweight servers)
Start your srever from the root of the project.
Suppose this is your file structure:
4 . Your preload should look like this: function preload() { img = loadImage('./images/super.png'); bg = loadImage('./images/fondo_juego.png');
function preload() { img = loadImage('./images/super.png'); bg = loadImage('./images/fondo_juego.png');
5 . with your server ,serving from the root folder this will defintely work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.