# Mouse Over and Blinking effect

**URL:** <https://forum.kirupa.com/t/mouse-over-and-blinking-effect/331081>\
**Category:** flash\
**Created:** [May 12, 2013, 10:32pm UTC](https://forum.kirupa.com/t/mouse-over-and-blinking-effect/331081 "2013-05-12T22:32:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![na\_il](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@na\_il](https://forum.kirupa.com/u/na_il)\
**Post date:** [May 12, 2013, 10:32pm UTC](https://forum.kirupa.com/t/mouse-over-and-blinking-effect/331081/1 "2013-05-12T22:32:05Z")

</div>

How can I get each individual movie clip to blink every x seconds when the mouse is over it?

```auto

var buttonArray:Array = [mystery, simple, adventure, peace];
var myTimer:Timer = new Timer(1000);

myTimer.addEventListener(TimerEvent.TIMER, glowEffect)

stage.addEventListener(Event.ENTER_FRAME, fitscreen)

function fitscreen(e:Event):void{

for each (var c in buttonArray)
{
    mystery.addEventListener(MouseEvent.ROLL_OVER, fadeIn);
    mystery.addEventListener(MouseEvent.ROLL_OUT, fadeOut);
    mystery.alpha = 1;
}
}

function glowEffect(e:TimerEvent){
           myTimer.start();
    if (this.alpha == 0){
        TweenMax.to(this, 1, {alpha:1});
    }
    
    if (this.alpha == 1){
        TweenMax.to(this, 1, {alpha:0});
    }
}

function fadeIn(e:MouseEvent):void
{
  myTimer.start();  
}

```
