I was just checking out the sprite load from URL action. so when i keep a textbox for the user to add the link and sprite should load the image from the link it does not work for me. When the URL is something like[quote:31ouwma1] https://encrypted-tbn1.gstatic.com/imag ... jEafYIHv_a
it does not work but when it is some other loooong URL that starst with sumting like [quote:31ouwma1]data:blah blah
it displays the image. any help please.
It may be that the server you're loading the image from does not give you permission to load the image.
Check the error log(console) in your browser by pressing F12.
I've tried it for you and here's the result in a screenshot:
Ah! So there's no way we can load an image? Tom , Ashley . Any help guys?
You would have to host it on your own website / hosting service to give permission to yourself probably.
Tried. No success.
The server must explicitly indicate that the image is allowed to be loaded from different domains using the Access-Control-Allow-Origin HTTP header. In the screenshot given above, it appears the gstatic.com owners deliberately don't want you to load their images remotely, likely for security reasons. It's up to the server operator if they allow that.
Got it. Ashley , rezagamertag any help on how I could determine the link typed in by the user is usable or not and explain to them ? Our how I could make it work better ?
I think you're going to have to tell us more about what you're trying to do.
Maybe there are other ways of doing it.
sure. I was making a web app with many of my games in it . In this, i also added a thing called quick links where u can add the url , name of website and url to load website logo from. When u press ok, a sprite is formed which has the logo loaded from url as image , the name in a textbox below it and loads the website from url on click.
There's no easy way to tell other than trying to load the image and seeing if it works. Perhaps you could try using the new file chooser plugin - it allows the user to select a local file instead of loading one off the web, and the local file should always load.
i have a prob. Ashley, when i add event make file chooser invisible, it isn't becoming invisible,
Develop games in your browser. Powerful, performant & highly capable.
Ashley your idea of using file chooser is good but how do i save the link and load it every time person uses it ?