Need help with a screens saver behaviour

For questions about using Classic.

Post » Sat May 16, 2009 12:47 am

If I have a list of sprites each representing an image.
I would like to do the following.
If(mouse.left=="up")
{
currentsprite=spritearray.getnext();
currentsprite.opacity=0;
currentsprite.display=true;
while(currentsprite.opacity<100)
{
currentsprite.opacity+=1;
oldsprite.opacity=-1;
}
oldsprite.destroy();
oldsprite=currentsprite;
}

So to explain with text I want to pick another sprite and make it fade in while the old sprite fades out. Making a smooth image swap.
Grateful for you help on this.
B
2
S
1
G
5
Posts: 79
Reputation: 1,558

Post » Sat May 16, 2009 3:04 am

Like so?

http://dl.getdropbox.com/u/529356/screensaver.cap

I'm sure there's a more efficient way to do it, but I just sort of threw it together.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat May 16, 2009 8:52 am

Thanks. Exactly what I needed.
:)
B
2
S
1
G
5
Posts: 79
Reputation: 1,558

Post » Sat May 16, 2009 4:10 pm

This took me a while. What do you think?
[url:lmru3lyz]http://www.mediafire.com/?sharekey=fbd84d0d4d4fabdc08f8df73f2072ed6e04e75f6e8ebb871[/url:lmru3lyz]
B
2
S
1
G
5
Posts: 79
Reputation: 1,558


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests