Problem getting a random gradient fill to work

Any ideas?

This works with having normal gradient fill with color:
[AS]
color_red = 0xFF0000;
color_blue = 0x0000FF;
_root.gear_x_width = Math.floor(Math.random()60)+10;
_root.gear_y_width = Math.floor(Math.random()20+_root.gear_x_width;
_root.gear_num_spokes = Math.floor(Math.random()5)+6;
_root.gear_inside = Math.floor(Math.random()
_root.gear_x_width/8)+_root.gear_x_width/6;
_root.gear_outside = Math.floor(Math.random()
_root.gear_x_width/10)+_root.gear_x_width/10;
//
with (_root[“gear”+1+i]) {
lineStyle(1, color_red, 100);
colors = [color_blue, color_red];
alphas = [100, 100];
ratios = [0, 255];
matrix = {a:0, b:_root.gear_y_width
1.5, c:0, d:_root.gear_x_width*1.5, e:0, f:0, g:0, h:0, i:1};
beginGradientFill(“radial”, colors, alphas, ratios, matrix);
draw_gear(0, 0, gear_x_width, gear_y_width, gear_num_spokes, gear_inside, gear_outside);
endFill();
}
[/AS]

This code just gives me black inside, but the fill color on the outside line is random.


_root.gear_x_width = Math.floor(Math.random()*60)+10;
_root.gear_y_width = Math.floor(Math.random()*20)+_root.gear_x_width;
_root.gear_num_spokes = Math.floor(Math.random()*5)+6;
_root.gear_inside = Math.floor(Math.random()*_root.gear_x_width/8)+_root.gear_x_width/6;
_root.gear_outside = Math.floor(Math.random()*_root.gear_x_width/10)+_root.gear_x_width/10;
//
with (_root["gear"+1+i]) {
	fill_color_a = "0x"+(Math.floor(Math.random()*255)+1).toString(16) +
(Math.floor(Math.random()*255)+1).toString(16) +
(Math.floor(Math.random()*255)+1).toString(16);
	fill_color_b = "0x"+(Math.floor(Math.random()*255)+1).toString(16) +
(Math.floor(Math.random()*255)+1).toString(16) +
(Math.floor(Math.random()*255)+1).toString(16);
	lineStyle(1, fill_color_a, 100);
	colors = [fill_color_b, fill_color_a];
	alphas = [100, 100];
	ratios = [0, 255];
	matrix = {a:0, b:_root.gear_y_width*1.5, c:0, d:_root.gear_x_width*1.5, e:0, f:0, g:0, h:0, i:1};
	beginGradientFill("radial", colors, alphas, ratios, matrix);
	draw_gear(0, 0, gear_x_width, gear_y_width, gear_num_spokes, gear_inside, gear_outside);
	endFill();
}