# Random eye blinking

**URL:** <https://forum.kirupa.com/t/random-eye-blinking/316517>\
**Category:** flash\
**Created:** [November 24, 2010, 7:39am UTC](https://forum.kirupa.com/t/random-eye-blinking/316517 "2010-11-24T07:39:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheMrSadClown](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@TheMrSadClown](https://forum.kirupa.com/u/TheMrSadClown)\
**Post date:** [November 24, 2010, 7:39am UTC](https://forum.kirupa.com/t/random-eye-blinking/316517/1 "2010-11-24T07:39:32Z")

</div>

This may seem trivial but for some reason I am having a difficult time getting the answer to this seemingly simple problem. I am trying to make an eye blink at random between 1-15 second intervals. I have a MC of the eye blinking, only 10 frames long, set on my stage (an outline of a head/face). On the first frame of the eye blinking MC labeled “Eye” I have this code:

stop();  
random\_number = Math.ceil(Math.random()\*15000);  
delay = setInterval(this, “play”, random\_number);

At first it seems like the code will work, then it appears to overlap itself over and over and over until the eye starts to blink rapidly without hesitation. Am I missing something? Or is the idea of getting this to work more complicated then it lets on… :sad2:
