Vibration Tutorial Button

Hello,

I’m trying to get the jitter effect applied to a button.

I currently have a mc called suggestcaption_mc with the following code applied to it.

onClipEvent (load) {
	this._x = 103.9;
	this._y = 30.2;
	cx = this._x;
	cy = this._y;
}
onClipEvent (enterFrame) {
	this._x = cx+(1+Math.random()*5);
	this._y = cy+(1+Math.random()*5);
}

This works fine. Now what I am trying to do is turn this into a button which does this effect on rollover? Any help would be appreciated. I tried sticking the mc in the hover keyframe of a button but this does nothing.