How to load image from URL of other website?

Get help using Construct 2

Post » Fri Aug 31, 2012 2:23 am

Im having an issue how to load image from URL, for example, i put Google Logo and it won't work.

https://www.google.com.mx/images/srpr/logo3w.png


I uploaded HTML5 on my server, only it works when my images are uploaded on my domain, but it didn't work from other websites.
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Aug 31, 2012 2:32 am

I got an error log:

Cross-origin image load denied by Cross-Origin Resource Sharing policy.

How do i fix it?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Aug 31, 2012 11:16 am

[QUOTE=Joannesalfa] I got an error log:

Cross-origin image load denied by Cross-Origin Resource Sharing policy.

How do i fix it?[/QUOTE]

Have you checked HTML Rocks tutorials-

Link

I've found a way to drag and drop images from desktop in the Construct window uses (podes html plugin), just need to work out how to enable editing of the image within C2?



Construct test
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Sun Sep 02, 2012 11:51 pm

@chrisbrobs i'm just curious, how did you add <script> tag?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Mon Sep 03, 2012 12:09 pm

[QUOTE=Joannesalfa] @chrisbrobs i'm just curious, how did you add <script> tag? [/QUOTE]

How it works (C2 R95)
1, Download the sample/source HTML file that comes with the tutorial link above.
2. Create a C2 project.

3, Add HTML_IFrame_Pode plugin.
4, Add the downloaded Html file into the C2 project files.
5, Add IFrame / URL link event
6, Run project

(Note- I changed the tutorial Html file name to simplify things)

Works in preview mode.
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Mon Sep 03, 2012 1:27 pm

For security reasons, browsers do not let you use any resources across domains. The rules, and solution, are the same as those described in the AJAX object manual entry about making cross-domain AJAX requests. In short, since Google won't opt-in to allow their resources to be used cross-domain, you cannot use them.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Aug 28, 2013 2:52 am

For this question,i found there is an assistance which can load image from url and process image as you wish .You can have a look.http://www.rasteredge.com/how-to/csharp-imaging/load-from-file/
B
2
Posts: 2
Reputation: 154


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests