Actionscript controlled movement

is it possible to write a function to move an object and then call that function on a clip event

for instance

function (bounce){
script;
script;
}

and then call it by saying

on(mouseOver){
this.bounce;
}

or something like that

an example of how this might work would be greatly appreciated

thanks


FUNCTION:

nName = function(){
     //script
}


BUTTON:

on(rollOver){
     nName()
}

thanks :eye: