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
383
S
224
G
86
Posts: 24,085
Reputation: 190,366

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
21
S
6
G
8
Posts: 328
Reputation: 6,611

Post » Tue Dec 25, 2012 2:28 pm

@lemo

Capx

You need Pode's img plugin.
B
107
S
25
G
241
Posts: 4,386
Reputation: 136,462

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
21
S
6
G
8
Posts: 328
Reputation: 6,611

Previous

Return to How do I....?

Who is online

Users browsing this forum: COcatdog, ColombageEnPLS and 14 guests