# Problems with stop();

**URL:** https://forum.kirupa.com/t/problems-with-stop/198253
**Category:** flash
**Created:** [August 23, 2006, 3:10pm UTC](https://forum.kirupa.com/t/problems-with-stop/198253 "2006-08-23T15:10:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Porter](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@Porter](https://forum.kirupa.com/u/Porter)
#### Post date: [August 23, 2006, 3:10pm UTC](https://forum.kirupa.com/t/problems-with-stop/198253/1 "2006-08-23T15:10:18Z")

</div>

I have a loop that looks something like this:

```
if (_root._currentframes == _root._totalframes) {
      stop();
      trace("should have stopped!!");
} else { 
      do some other stuff;

```

}

when currentframes == totalframes, it calls the stop and trace function but not just once, infinatly. When currentframes == totalframes I want the whole program to stop!! Any idea’s??
