# Rollover Vibration

**URL:** https://forum.kirupa.com/t/rollover-vibration/96670
**Category:** Uncategorized
**Created:** [December 12, 2003, 3:14am UTC](https://forum.kirupa.com/t/rollover-vibration/96670 "2003-12-12T03:14:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Timage](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@Timage](https://forum.kirupa.com/u/Timage)
#### Post date: [December 12, 2003, 3:14am UTC](https://forum.kirupa.com/t/rollover-vibration/96670/1 "2003-12-12T03:14:19Z")

</div>

G’day.

I’m was trying to make the vibration effect in the tutorials to happen in a rollover, but I failed miserably. I did a google search and a search on the fourms but found nothing that helped me.

Cheers. :puzzle:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 12, 2003, 12:33pm UTC](https://forum.kirupa.com/t/rollover-vibration/96670/2 "2003-12-12T12:33:48Z")

</div>

What tutorial?

I can suggest one technique for a rapid random vibration:

1. Make sure the rollOver object is a movieclip instance.

2. Convert this to a movieclip.

3. On the nested clip, put keyframes at frame 1 and 2.

4. On the instance on frame 2, apply this script:  
[AS]  
onClipEvent(enterFrame){  
this.\_x = random(5);  
this.\_y = random(5);  
}  
[/AS]

put a stop(); action on the first and second frame of this nested clip.

1. On the parent clip type:  
[AS]  
on(rollOver){  
this.play();  
}  
on{rollOut){  
this.play();  
}  
[/AS]

You can lay one clip on top of the other and reduce the alpha to give a better vibration effect. If you do this, you have to give them all an instance name, because the this keyword will only work for the top object. Works best at a high frame rate, eg 18+.
