# Vibration Tutorial Button

**URL:** <https://forum.kirupa.com/t/vibration-tutorial-button/162453>\
**Category:** flash\
**Created:** [September 13, 2005, 2:57pm UTC](https://forum.kirupa.com/t/vibration-tutorial-button/162453 "2005-09-13T14:57:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saveth](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@saveth](https://forum.kirupa.com/u/saveth)\
**Post date:** [September 13, 2005, 2:57pm UTC](https://forum.kirupa.com/t/vibration-tutorial-button/162453/1 "2005-09-13T14:57:21Z")

</div>

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.

```auto
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.
