How to load image from cross-site

Get help using Construct 2

Post » Sun Jul 15, 2012 7:25 pm

@rexrainbow : you're welcome ;).
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Jul 15, 2012 7:41 pm

AFAIK, toDataURL() is blocked if you've drawn a cross-domain image to it (if it did not send the access control HTTP header). This is another security measure to prevent accessing the pixel data of cross-domain images.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Dec 22, 2012 10:44 am

[QUOTE=rexrainbow] @Pode

I use your div plugin, put <img> tag by action:innerhtml. It works, thanks.[/QUOTE]


Sounds fun :]
Can we have a capx or some detail/tutorial on how to do that?

I tried loading images from a proxy (like this http://code.google.com/p/mirrorrr/) on my domain, but while it used to work with flash and other stuff, I can't make it work with C2 :\
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Tue Dec 25, 2012 2:28 pm

@lemo

Capx

You need Pode's img plugin.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Wed Dec 26, 2012 4:54 am

Thanks for the capx!
Actually I made it work in the meantime with my proxy method, but it doesn't hurt knowing an alternative I guess ^^

Just tried the plugin though, and I'm gonna have to stick with the proxy (and load img from url) for now, because the Sprite element is more flexible for my use

Also "Set image to URL" from the plugin gives me an error...
(reporting in the other thread)lemo2012-12-26 05:01:32
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Previous

Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Magistross, PavleNikolic and 24 guests