# Inactivity timer mistake?

**URL:** <https://forum.kirupa.com/t/inactivity-timer-mistake/303431>\
**Category:** Uncategorized\
**Created:** [January 20, 2010, 9:21am UTC](https://forum.kirupa.com/t/inactivity-timer-mistake/303431 "2010-01-20T09:21:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benzrecordings](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/benzrecordings/32/1337_2.png) [@benzrecordings](https://forum.kirupa.com/u/benzrecordings)\
**Post date:** [January 20, 2010, 9:21am UTC](https://forum.kirupa.com/t/inactivity-timer-mistake/303431/1 "2010-01-20T09:21:55Z")

</div>

hey,  
I have a problem with an inactivity timer. I want a warning message to appear if a user is inactive with mouse movement for a period of time. The function itself does work, i tested it with the “trace” tag…

I want a Movieclip: “inactivitywarning” wich has the alpha of 0 to fade to 100% and a message will appear…

it does not work! where’s my mistake (the path to the MC is correct)?:

```auto
var inactiveTime = 5000;// 5 seconds 
function tooLong(){ 
    inactivitywarning.alphaTo(100, 0.5, "easeOutSine",0); 
} 
var intrvl = setInterval(tooLong, inactiveTime); 
onMouseMove = function(){ 
    clearInterval(intrvl); 
    intrvl = setInterval(tooLong, inactiveTime); 
}  
Key.addListener(this);

```
