passing parameters to a behaviour

Can't seem to do this. I get and error saying ' Update() can not take parameters.' This means there's something very wrong with my understanding!

I want to attach a behaviour (in game) to an object. Perhaps a behaviour that makes it transform in the x axis continuously by a certain amount.

This amount will not be definite, it will be decided in game. So I need to pass this parameter to the update script while the game runs.

I want to do something like:

// in another script
var thing = Instantiate(myObject, transform.position, transform.rotation);
var howMuchToMove = 12;
//add the script to the object and pass a variable
thing.AddComponent(moveInX(howMuchToMove));

//in the moveInX script that will be attached to the object
function Update(howMuchToMove) {
   //move continuously by an an amount defined elsewhere
   transform.position = Vector3(howMuchToMove, 0, 0);
}

I get and error saying 'Update() can not take parameters.' I can see a problem here; that update will always be checking for the parameter when really that only needs to happen once, but I don't see any other way of getting a variable to it.

Just slightly modified your own code to give an example:

// in another script
var thing = Instantiate(myObject, transform.position, transform.rotation);
var howMuchToMove = 12;
//add the script to the object
var script : moveInX = thing.AddComponent(moveInX);
//set the movement amount on the instance of the script
script.howMuchToMove = howMuchToMove;

//in the moveInX script that will be attached to the object
var howMuchToMove : float = 0;

function Update() {
   //move continuously by an an amount defined above
   transform.position = Vector3(howMuchToMove, 0, 0);
}

you can get another script of this gameObject or even a script of another object using GetComponent and then call it's public methods with the arguments that you defined or set their public variables. the code that Mike shown is a correct example. you can have a script with a function like this

function MoveSome (float s)
{
//write code here
}

then in your other script just use GetComponent of Move script and call this

GetComponent(MoveScript).MoveSome(movementamount);

this is the correct way.