loading images from URL, how to know when its over?

Get help using Construct 2

Post » Fri Mar 27, 2015 12:16 pm

Hello

I have small problem, i am downloading images from server and use paster to display them.
all works ok but if i download 100 of images normaly it takes some time to download all the way to the last one.
Now mine problem is how to determine when is the last image downloaded and job is done?
I want to add loading gif that gets destroyed on finish.
If i set mine action simply in the next event it is executed instantly even though download is still in progres.

thanx!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Fri Mar 27, 2015 1:06 pm

As mentioned in the sprite manual article you have access to a "On image URL loaded" trigger that will trigger once the current image is finished loading.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,293
Reputation: 70,769

Post » Fri Mar 27, 2015 2:19 pm

@Kyatric

Thank you, i know that... but since i use paster... theres no such trigger... :(
And if i use sprites, than i can't (or atleest i dont know how) set different images on different instances of the same sprite.
(notice: i can do that as long as i don't move instances... but i swipe them left and right).
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Fri Mar 27, 2015 4:07 pm

In that case I guess you should ask R0j0hound to add the trigger to the paster plugin (if I understand correctly you are loading images from URL in that third-part plugin).
Or ask your specific question in the thread of the plugin since it is related to its use.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,293
Reputation: 70,769

Post » Fri Mar 27, 2015 4:24 pm

@Kyatric

Thank you.
I was mentioned in first post that i use paster.
And i was thniking that there might be some common way to get that information.

Ill try to contact R0j0

@R0j0hound

May you help me with this problem?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Sat Mar 28, 2015 1:41 am

Until I add such a trigger you could use a sprite to do all the loading and on the loaded trigger paste the image into a paster.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991


Return to How do I....?

Who is online

Users browsing this forum: AllanR, BackendFreak, farsen, Prominent, R0J0hound and 33 guests