How do I Remove image from sprite

Get help using Construct 2

Post » Thu Feb 23, 2017 11:57 pm

hey guys iv been using file chooser to import a image using "load image from url" but I would like to have to option to remove it from that sprite by pressing an X in the top corner so the sprite returns to the original "Insert image here" is this possible?
B
18
S
7
Posts: 13
Reputation: 1,235

Post » Fri Feb 24, 2017 1:15 am

Sounds like you would have to create a sprite called delete and pin it to your sprite and call that event when you click on that delete sprite to reload the previous image?
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,800

Post » Fri Feb 24, 2017 1:50 am

cheers but ialready tried destroying sprite and creating again via click on the X sprite. even tried to allocate image by UID but seems apply to sprite globally. and whenever I recreate the sprite it comes back with the same image. thanks again for any help
B
18
S
7
Posts: 13
Reputation: 1,235

Post » Fri Feb 24, 2017 1:56 am

nmf004 wrote:cheers but ialready tried destroying sprite and creating again via click on the X sprite. even tried to allocate image by UID but seems apply to sprite globally. and whenever I recreate the sprite it comes back with the same image. thanks again for any help


OK but I didn't tell you to destroy the sprite.

I said use a pinned sprite as a trigger to change just the image in that sprite. You have to have the other image loaded for the change to work.

Best of luck!
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,800

Post » Fri Feb 24, 2017 2:04 am

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Fri Feb 24, 2017 2:34 am

@korbaach thanks man ey, your method was the only way to do it that seemed to work, so simple to, you both are champions thank you very much!!!!!!
B
18
S
7
Posts: 13
Reputation: 1,235


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 7 guests