How to apply function to objects

Hello friends I am jay

I have an doubt that is

we will create functions for addition and subtraction like etc is it?
for example
function combine(a, b) {
return a+b;
}

now we will call this fucntion like this
var total = combine(3, 2);
trace(total);
it will work properly
Here comes the problem now
now I want to animate or move an object stage through function and I would like to apply the same function what I created to objects on stage is possible ? if it possible how ? let me know
I hope U will Understood my problem
Reply me soon