# Bullet problem

**URL:** <https://forum.kirupa.com/t/bullet-problem/241181>\
**Category:** Uncategorized\
**Created:** [October 10, 2007, 6:14pm UTC](https://forum.kirupa.com/t/bullet-problem/241181 "2007-10-10T18:14:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phena](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@phena](https://forum.kirupa.com/u/phena)\
**Post date:** [October 10, 2007, 6:14pm UTC](https://forum.kirupa.com/t/bullet-problem/241181/1 "2007-10-10T18:14:34Z")

</div>

promblem simply is that not all bullets are deleted…

```auto

function MoveBullets() {
    for(c=BulletsDeleted-10 ; c<BulletCount ; c++) {
        _root["b"+c]._x += _root["bo"+c].dirx
        _root["b"+c]._y += _root["bo"+c].diry
        if(_root["bo"+c].movesleft > 0) {
            _root["bo"+c].movesleft--
        } else {
            _root["b"+c].removeMovieClip()
            BulletsDeleted++
        }
    }
}
setInterval(MoveBullets,10)

```

i cant see whats wrong with my function  
bo = bulletobject
