We are about to switch to a new forum software. Until then we have removed the registration on this forum.
here is the problem when i type the example of loadImage in my js file, and load the image in the folder"assets" which were located between the index.html and sketch.js, there is no image pop up after i run it to browser. i think its simple but i could not get it ,any one help please.
Answers
while i think its sort of like a bug or capability to Yosemite, because when i try to open the example file from p5.js example of the load image, same issue occur. anyone have some solutions for that?
It's almost certainly the browser security feature that restricts the loading of files when opening html pages hosted on the local machine. Solution: run sketches on a server (this can be running locally of course).
https://www.mozilla.org/en-US/firefox/developer/
I could also have suggested using the Brackets editor which includes a server that you can launch at the press of a button; including live update of HTML/CSS edits; and JS updates on file save. But that forces you to use Chrome and doesn't play well with dev tools :(
Firefox Dev Edition is bleeding edge, memory sucking and not going to be to everyone's taste. I use it through choice; but it's not really for us to impose our preferences on others :P
Also in my experience these security restrictions/holes are subject to change; so changing browser is not necessarily a sustainable solution.
I also try the offline loading in the pc IE10, its the same problem, so i am wondering why the force the html could not load local file, for what?
BTW its working on the firefox, than you!
For the reasons described above: this is a security feature implemented in some browsers (IE, Chrome, Safari) and not in others (Firefox). You'll have this problem whenever you need to load resources (images, sound files, text files etc).