This is becoming rather frustrating as its probably a simple problem I just can't see it and I need an extra pair of eyes.

This function will make a movie clip rotate backwards and forwards once the counter variable hits a certain number (the variable 'delay'), and rotate at a certain speed ('speed') - which will either be 1 or 2)).

Problem is I can't seem to get the individual movieclip to respond without writing the function on the movieclip itself, the function is currently on the main timeline.

Code I'm Using:
(On the Main Timeline)

Code:
function shake(delay, speed)
{
if(_root.counter > delay)
{
	if(anticlock == 0)
		{ this._rotation += speed; } 
	else
		{ this._rotation -= speed; }
	
	if(this._rotation == 4)
	{
		anticlock = 1;
	}
	else if(this._rotation == -4)
	{
		anticlock = 0;
	}

}
}
then on the movieclip i'm simply putting:

Code:
onClipEvent(enterFrame)
{
shake(3, 1)
}
...which doesn't work. If I put the function on top of the movieclip and then call the function then it does work.
I've tried using

_root.shake(3, 1);

and that works but it shakes the entire movie not the clip.
this.shake(x, x)
doesn't work either... and this._root.shake(x, x) .. shakes the entire movie as well.

... what am I doing wrong :/