Clear Sprite Image?

Get help using Construct 2

Post » Fri May 17, 2013 12:43 pm

Hi,

I got a PNG image loaded into the sprite object via URL.

Before loading the next one, I need to clear the sprite object, so the last PNG does not shine through the next one.

How can I do this?

Thanks :)
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Fri May 17, 2013 1:25 pm

OK, got it.

canvas.width = canvas.width;

does the job in js. Just need to add an event everytime the sprite should be cleared:

set canvas size to sprite.width x sprite.height

in case the sprite size is the same as the layer.
B
15
S
3
G
5
Posts: 396
Reputation: 4,977


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests