Functions

[size=+2][color=#680aac][font=Comic Sans MS][size=2]How do you make a function where you type, for example, bladibladiblah(whatever, whatever2, whatever3);, and the whatevers be a variable in the function? Here’s my code:

function colorFade(endRa, endRb, endGa, endGb, endBa, endBb, endAa, endAb, speed) {
speed = speed;
myTransform = new Object();
rA += (endRa-rA)/speed;
rB += (endRb-rB)/speed;
gA += (endGa-gA)/speed;
gB += (endGb-gB)/speed;
bA += (endBa-bA)/speed;
bB += (endBb-bB)/speed;
aA += (endAa-aA)/speed;
aB += (endAb-aB)/speed;
myTransform.ra = rA;
myTransform.rb = rB;
myTransform.ga = gA;
myTransform.gb = gB;
myTransform.ba = bA;
myTransform.bb = bB;
myTransform.aa = aA;
myTransform.ab = aB;
colorFunction = new Color(this);
colorFunction.setTransform(myTransform);
}

Then, on my MC, there’s this:
onClipEvent (enterFrame) {
colorFade(-100, 256, -100, 256, -100, 256, 100, 0, 5);
}

Shouldn’t that pass on the variables I used to call the function to the actual function as endRa, endRb, endGa, etc., etc.?[/size][/font][/color][/size]