How function works?

hi, i have a simple mc and now trying to using function() to do the trick. My code as below:
this is the function I put in the timeline:

function slotclick(aa)
{
	var bb = aa;
	_root. + [bb] + .gotoAndPlay(1);
}

this is the code i wrote within a mc:

on(release)
{
	slotclick(slip);
}

but the movie failed to run, what happening actually? if possible someone pls provides me a tutorials on how how to pass the parameters to funcion and then return back to the mc. Thanks.