# Help with clearInterval URGENT!

**URL:** <https://forum.kirupa.com/t/help-with-clearinterval-urgent/169459>\
**Category:** Uncategorized\
**Created:** [November 16, 2005, 1:51pm UTC](https://forum.kirupa.com/t/help-with-clearinterval-urgent/169459 "2005-11-16T13:51:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drybone](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Drybone](https://forum.kirupa.com/u/Drybone)\
**Post date:** [November 16, 2005, 1:51pm UTC](https://forum.kirupa.com/t/help-with-clearinterval-urgent/169459/1 "2005-11-16T13:51:52Z")

</div>

[color=Sienna]onClipEvent (enterFrame) {  
function rekka() {  
\_root.rekka\_mc.\_x = 640+random(400);  
\_root.rekka\_mc.\_y = random(400);  
}  
if (this.hitTest(\_root.rekka\_mc)) {  
\_root.rekka\_mc.\_x+=13; //there to stop the rekka\_mc from moving  
var test;  
test = setInterval(rekka, 100);  
clearInterval(test);  
}  
}

[color=Black]I want the code to do the rekka function once! but it doesnt move that rekka\_mc anywhere? If I dont use clearInterval it does the rekka funciton over and over again…  
SO HOW DO I GET IT TO DO THE REKKA FUNCTION ONCE!  
PLEASE HELP  
[/color][/color]
