//convert the strings from the gradient input boxes into numeric valuesThis uses two new functions: Number() and parseInt(). The Number function has many uses, but in this case it parses the testcolor string and converts it to a decimal value, and does the same with the alpha values (which, because theyre taken from input text boxes, are initially read as strings).
tscolor1=Number(testcolor1);
color1=parseInt(tscolor1,10);
tscolor2=Number(testcolor2);
color2=parseInt(tscolor2,10);
tsalpha1=Number(_root.base.ga1);
tsalpha2=Number(_root.base.ga2);
The value returned for the alpha values works fine as-is, but the number returned for the gradient colors will make a bit of a mess...and so we use parseInt to convert it to an integer in base ten (decimal). parseInt takes an expression and converts it to a value in a radix/numeric base, such as octal [parseInt (expression,8)] or hexadecimal [parseInt (expression,16)].


