# How do you check if a variable is defined?

**URL:** <https://forum.kirupa.com/t/how-do-you-check-if-a-variable-is-defined/238603>\
**Category:** flash\
**Created:** [September 13, 2007, 12:02am UTC](https://forum.kirupa.com/t/how-do-you-check-if-a-variable-is-defined/238603 "2007-09-13T00:02:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stoney\_kun](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/stoney_kun/32/3395_2.png) [@stoney\_kun](https://forum.kirupa.com/u/stoney_kun)\
**Post date:** [September 13, 2007, 12:02am UTC](https://forum.kirupa.com/t/how-do-you-check-if-a-variable-is-defined/238603/1 "2007-09-13T00:02:38Z")

</div>

Due to the nature of a looping video clip i am working on… I have a sound object that i want instantiated only once!

```auto
var s:Sound = new Sound();

```

I wanna set up an if statement that determines whether this sound object has been defined yet! Is this possible?

Thanks,  
stoney.
