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: 708
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
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

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

Post » Tue Dec 25, 2012 2:28 pm

@lemo

Capx

You need Pode's img plugin.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

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

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests