Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Needing to Fade a Logo

Author
Message
PeeJayGee 2004
20
Years of Service
User Offline
Joined: 31st Jan 2004
Location: TN, USA
Posted: 26th Mar 2008 21:41
Dear All,

I have a logo that is 314 by 89, that I'm ultimatly trying to get it to fade into the centre of the screen, wait a few seconds and

fade out....

I'm loading it as an Image, and I'm coming to the conclusion that I can't mess around with the colours with it....

Is there an easy way to achieve the fade with an image? I've searched around these forums and google, and I'm not turning up anything that seem easy to implement?

Hope someone can help me...
Regards
Paul.

Don't jump, if you do you will only fall, and hurt yourself
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 26th Mar 2008 21:54
yes, sure there's an easy way .. so let's say your image is number 1 and the sprite is also number 1 .. delay is a variable which u'll see why you need later

load image "your location",1
sprite 1,center x,center y,1
delay=0


now we want to make it invisible at first

transparency=0

now let's render things to the screen:

do
set sprite alpha 1,transparency


now let's start fading in

if (transparency<=252) and (delay=0) then transparency=transparency+3

now let's wait for a few seconds before fading out:

if (transparency=255) and (delay<=59) then delay=delay+1

now let's fade out

if (transparency>=3) and (delay=60) then transparency=transparency-3
loop


so on short, here's the full code:


Could you help me treat my injured Dino-Fly ?
PeeJayGee 2004
20
Years of Service
User Offline
Joined: 31st Jan 2004
Location: TN, USA
Posted: 27th Mar 2008 16:34
Thank you...I'll give it a go...

Don't jump, if you do you will only fall, and hurt yourself

Login to post a reply

Server time is: 2024-09-27 12:16:19
Your offset time is: 2024-09-27 12:16:19