# Running functions

**URL:** <https://forum.kirupa.com/t/running-functions/206692>\
**Category:** Uncategorized\
**Created:** [November 10, 2006, 2:21pm UTC](https://forum.kirupa.com/t/running-functions/206692 "2006-11-10T14:21:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhryn](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Dhryn](https://forum.kirupa.com/u/Dhryn)\
**Post date:** [November 10, 2006, 2:21pm UTC](https://forum.kirupa.com/t/running-functions/206692/1 "2006-11-10T14:21:47Z")

</div>

I know how to write and use a function, but the problem is that it is only rn once. e.g.

[AS]  
function runningAllTheWay(){  
//code  
}  
[/AS]

I want it to have an onEnterFrame property but with the usage of the normal function. somthing like

[AS]  
function somethingLike(){  
onEnterFrame = function(){  
//run code for 20 frames  
}  
}  
[/AS]

Problem is that I dont know how to write this properly, if some one could help it would be greatly appreciated.
