# Explicitly call functions

**URL:** <https://forum.kirupa.com/t/explicitly-call-functions/296357>\
**Category:** flash\
**Created:** [September 14, 2009, 5:47am UTC](https://forum.kirupa.com/t/explicitly-call-functions/296357 "2009-09-14T05:47:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noobie123](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@noobie123](https://forum.kirupa.com/u/noobie123)\
**Post date:** [September 14, 2009, 5:47am UTC](https://forum.kirupa.com/t/explicitly-call-functions/296357/1 "2009-09-14T05:47:41Z")

</div>

I have a function that is called on a keydown event. Inside the function I do this:

function keyDownHandler(event : KeyboardEvent) : void  
{  
if(cursorMoveCnt \< 5 && event.keyCode != Keyboard.ENTER)  
{  
trace(i);  
trace(cursorMoveCnt);  
stage.focus = arrayOfBoxes[i+cursorMoveCnt];  
cursorMoveCnt++;  
}

I want to call the same function after every 20 seconds even if enter key is not pressed by the User. Can I create the same effect as pressing the Enter key through code in some way so that the code within the if condition inside the function gets executed?
