# Removing "this" Class from Display List

**URL:** <https://forum.kirupa.com/t/removing-this-class-from-display-list/224098>\
**Category:** flash\
**Created:** [April 28, 2007, 3:18pm UTC](https://forum.kirupa.com/t/removing-this-class-from-display-list/224098 "2007-04-28T15:18:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TastyLamp](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@TastyLamp](https://forum.kirupa.com/u/TastyLamp)\
**Post date:** [April 28, 2007, 3:18pm UTC](https://forum.kirupa.com/t/removing-this-class-from-display-list/224098/1 "2007-04-28T15:18:45Z")

</div>

Hellos. Just wondering if anyone can help with a small problem I’ve been having…

I’m making an AS3 app that spawns a bunch of particles. Each particle uses a Particle class that extends Sprite. The particle is then added to the display list.

Inside Particle.as, I have code to handle all of the movement and stuff. I want the particle to delete itself when it goes outside the screen. Right now, I have something like this:

```auto
if(x>550 || x<0 || y>400 || y<0){
parent.removeChild(this);
}

```

Unfortuently, that doesn’t work - and seems to just crash Flash majority of the time.

So yeah…how do I delete the particles - from within Particle.as? 🙂
