here the script i use to generate a gradient as the background:
if (bgcolor == 5) {
wSize = 1500;
hSize = 1200;
fillType = “linear”;
colors = [0xAEAE00, 0xEEEE00];
alphas = [100, 100];
ratios = [0, 255];
matrix = {matrixType:“box”, x:0, y:0, w:wSize, h:hSize, r:90/180*Math.PI};
_root.lineStyle(1, 0xFFFFFF, 0);
_root.beginGradientFill(fillType, colors, alphas, ratios, matrix);
_root.lineTo(wSize, 0);
_root.lineTo(wSize, hSize);
_root.lineTo(0, hSize);
_root.lineTo(0, 0);
_root.endFill();
bgcolor = 0;
}
problem is, if i change the gradient using the “bgcolor” variable, like if bgcolor is a different number, different gradient will appear, the colours just replaced each other.
is there a way to make it animate smoothly?
example here:
http://lab.mathieu-badimon.com/
check out the background, please help!