# How to make the vibration effect stop

**URL:** <https://forum.kirupa.com/t/how-to-make-the-vibration-effect-stop/28665>\
**Category:** Uncategorized\
**Created:** [August 16, 2003, 10:09am UTC](https://forum.kirupa.com/t/how-to-make-the-vibration-effect-stop/28665 "2003-08-16T10:09:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![janecruy](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@janecruy](https://forum.kirupa.com/u/janecruy)\
**Post date:** [August 16, 2003, 10:09am UTC](https://forum.kirupa.com/t/how-to-make-the-vibration-effect-stop/28665/1 "2003-08-16T10:09:41Z")

</div>

Hi there

I did the ‘Vibration effect’ tutorial - thanks for the help… but am not sure how to let the vibration occur for a finite timeframe. i.e. how do i make it stop?

Please help!

Thanks  
Jane

---

<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:** [August 16, 2003, 3:16pm UTC](https://forum.kirupa.com/t/how-to-make-the-vibration-effect-stop/28665/2 "2003-08-16T15:16:32Z")

</div>

r u using mx? then i guess you can use delete this.onEnterFrame;  
or something like that. This might work-

movieclip.onEnterFrame=function(){  
i++  
movieclip.\_x+=(Math.floor(Math.random()\*2))  
movieclip.\_y+=(Math.floor(Math.random()\*2))  
(i==300)?(delete this.onEnterFrame) : (movieclip.\_alpha=100)  
}

---

<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:** [August 17, 2003, 8:07am UTC](https://forum.kirupa.com/t/how-to-make-the-vibration-effect-stop/28665/3 "2003-08-17T08:07:44Z")

</div>

Thanks!

I am using MX. I actually got it to work by putting the movie clip in another movie clip and then pasting that into the timeline for a finite period.

By the way, the kirupa site is excellent. A couple my classmates are using it too.

---

<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:** [August 17, 2003, 4:31pm UTC](https://forum.kirupa.com/t/how-to-make-the-vibration-effect-stop/28665/4 "2003-08-17T16:31:59Z")

</div>

Just a note: use

```auto
if (i > 300) delete this.onEnterFrame ;

```

rather than

```auto
(i==300)?(delete this.onEnterFrame) : (movieclip._alpha=100)

```

which doesn’t really make sense 🙂
