Is there a way to do this with code...and so that you can vary the speed at which it fades out?

Thanks.