# Stop script

**URL:** <https://forum.kirupa.com/t/stop-script/121275>\
**Category:** Uncategorized\
**Created:** [September 1, 2004, 4:41pm UTC](https://forum.kirupa.com/t/stop-script/121275 "2004-09-01T16:41:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [September 1, 2004, 4:41pm UTC](https://forum.kirupa.com/t/stop-script/121275/1 "2004-09-01T16:41:14Z")

</div>

i’m trying to figure out how to create a script that will perform a stop(); after the frame has been hit 3 times

so i think i need to set a variable and add 1 to it each time the frame is hit until it gets to 3 and then when it hits 3 stop();

so would it look like this?

```auto

i=0
onEnterFrame{
if (i>=3){
stop();
}else{
i+=1;
}
}

```
