How do I "Load Image from URL" ?

Just started using Construct 2? Post your questions here

Post » Sat May 24, 2014 7:49 am

I have a tempSprite that I use the System to create a duplicate of (I think is how this works?) But when I tell the newly created tempSprite to "Load image from URL" it does not change the image of the sprite. This part of the code is activated, and the URL seems to pass from AJAX, but the sprite does not change and the "on Image URL loaded" never triggers. I am running a compiled HTML5 website version. The pictures are stored on the same domain, though not in the same directory. The images are .PNG if that matters and I am using the free version for now. I have tried hard coding a valid URL as well. No change. It just copies the same graphic as the original tempSprite.

I searched the forums, tutorials, and Google with no success.

Any ideas?
B
6
S
2
Posts: 37
Reputation: 524

Post » Sat May 24, 2014 7:21 pm

check chrome console.
any error there?
B
8
S
2
Posts: 9
Reputation: 857

Post » Sun May 25, 2014 12:15 am

Message: arrall is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Thanks! That console will be very helpful. It is a cross domain policy between and just arrall.com. Not sure how to fix that, so for the time being, I just string replaced www. with "" when fetching urls from the database.

Now the issue is all of the copies of the tempSprite seem to share the same image data but allow for different positional data. What should I use if I want to create sprites with their own image data programmatically while the app is running? (short of declaring a ton of tempSprite1, tempSprite2, tempSprite3... etc) Sorry I have not gone through all of the tutorials, I was hoping to just verify that a few techniques are possible in Construct 2 vs Flash, before purchasing it.
B
6
S
2
Posts: 37
Reputation: 524


Return to Beginner's Questions

Who is online

Users browsing this forum: kainrazial and 1 guest