# Deleting a class/sprite

**URL:** <https://forum.kirupa.com/t/deleting-a-class-sprite/256699>\
**Category:** flash\
**Created:** [April 6, 2008, 5:56am UTC](https://forum.kirupa.com/t/deleting-a-class-sprite/256699 "2008-04-06T05:56:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skimmmer](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@skimmmer](https://forum.kirupa.com/u/skimmmer)\
**Post date:** [April 6, 2008, 5:56am UTC](https://forum.kirupa.com/t/deleting-a-class-sprite/256699/1 "2008-04-06T05:56:34Z")

</div>

Hi,

I made a class (which extends sprite) that has a game I created in it, I add it using:

```auto
gameS:Game = new Game(this.stage,mp3,id);

```

But when I use:

```auto
delete this;
this.parent.removeChild(this);

```

(inside the class), it is not visible but functions inside are still operating. This is a public class with public vars. Am I using the wrong type for the class or am I deleting and removing the class/sprite incorrectly?

Thanks!
