Ho do i change instance sprites image from url?

Get help using Construct 2

Post » Tue Dec 11, 2012 9:19 pm

Hi guys!

i need some help with changing instance sprites image with load image from url action.

i want to pick every instance sprite then change his image (from url)

or will be better if i could change the sprites image right after

creation of that instance.

i tried but when i put image changing in loop then only the last

instance shows image the others are full black.

the loop loads all images to other instances too, (what is wrong), and

then they change to black

check capx and exported project please...

here is capx

and the exported project

the rotation is just for checking that picking sprites works

thank you!

B
19
S
3
G
5
Posts: 98
Reputation: 4,647

Post » Wed Dec 12, 2012 5:16 am

check this capx where i create the sprites https://dl.dropbox.com/u/80050021/SmoothScroller.capx this should help. The hack is where u can create unique sprites by incrementing and changing the current frame.
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Wed Dec 12, 2012 5:59 am

@tringio

i want to download frames from url at runtime, and in your example you

have frames already loaded...

B
19
S
3
G
5
Posts: 98
Reputation: 4,647

Post » Wed Dec 12, 2012 7:10 am

yes u can still do it , after u set the animation frame , u can do the Load Image from URL which should work. check the screen shot below, but make sure u wait for the image to load by listening to the "On Image Loaded URL event "
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Wed Dec 12, 2012 1:30 pm

@tringio

thank you now its working fine, and without On Image Loaded URL event

link to project
B
19
S
3
G
5
Posts: 98
Reputation: 4,647


Return to How do I....?

Who is online

Users browsing this forum: BipolarMike, totoe, Yahoo [Bot] and 19 guests