# "if" Statement Question

**URL:** https://forum.kirupa.com/t/if-statement-question/275266
**Category:** flash
**Created:** [November 11, 2008, 10:53pm UTC](https://forum.kirupa.com/t/if-statement-question/275266 "2008-11-11T22:53:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![skelebunny](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@skelebunny](https://forum.kirupa.com/u/skelebunny)
#### Post date: [November 11, 2008, 10:53pm UTC](https://forum.kirupa.com/t/if-statement-question/275266/1 "2008-11-11T22:53:31Z")

</div>

I’ve created a particle effect that moves random particles starting inside the stage that eventually move off of the stage. I’m trying to put a removeEventListener in an “if” to take the particles off the stage when the are not in sight. My only problem is I don’t know how to phrase that condition. I’ve tried variations of the below code but don’t get the right effect.

[AS]  
if (this.x \> stage.stageHeight)  
{  
this.removeEventListener…  
}  
[/AS]

Any help would be appreciated!
