# Slow game after a while :(

**URL:** <https://forum.kirupa.com/t/slow-game-after-a-while/319681>\
**Category:** Uncategorized\
**Created:** [March 1, 2011, 4:09pm UTC](https://forum.kirupa.com/t/slow-game-after-a-while/319681 "2011-03-01T16:09:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ah41](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@ah41](https://forum.kirupa.com/u/ah41)\
**Post date:** [March 1, 2011, 4:09pm UTC](https://forum.kirupa.com/t/slow-game-after-a-while/319681/1 "2011-03-01T16:09:58Z")

</div>

hi, i’m new as3

I’m making a game with as3, it is very simple, but when I almost have finished the first “beta” of my game i realized that it become slow later a while playing ☹

the game (2d) is only a ball (player) that shot mini balls against enemies that run to the player.

I have trying a lot of time to solve my problem by myself, but i couldn’t.  
Only i can realize that the problem is about the creation of the enemies and mainly about the creation of the shots, this is created by a class called “scene” that through a addEventListener (Enter\_frame), create and move this objects. After a while, when the game has created a lot of enemies and shots, the game begin to become slow; i delete the object and the variables with remove child and delete(), respectively but the problem continues.

Pleaseee , help me, i think that the things that the game creates aren’t completely deleted.

someone can explain me what happend and how i can solve that, some example maybe?

I need your help, here is part of my code (where probably is the problem):

[http://www.copiatelo.com/index.php?show=m1e0a19c7](http://www.copiatelo.com/index.php?show=m1e0a19c7)

also i uploaded all my files including de .flaa and .as  
[http://www.mediafire.com/?bb8goumuzrjcvaw](http://www.mediafire.com/?bb8goumuzrjcvaw)

also here is my mail [al.varo.442@gmail.com](mailto:al.varo.442@gmail.com)

help me, pleaseeee…

with any help, I’ll be grateful

Thanks!
