Preloader that adjusts gradient fill

Hi Guys,
Any ideas on how to create a preloader that adjusts the gradient fill of say a rectangle. So it would appear that the gradient is growing out to the edges until it is no longer seen?

Long shot but help is much appreciated.