# Are variables automatically initialized to false?

**URL:** <https://forum.kirupa.com/t/are-variables-automatically-initialized-to-false/129704>\
**Category:** Uncategorized\
**Created:** [November 27, 2004, 12:28am UTC](https://forum.kirupa.com/t/are-variables-automatically-initialized-to-false/129704 "2004-11-27T00:28:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedevs](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@mikedevs](https://forum.kirupa.com/u/mikedevs)\
**Post date:** [November 27, 2004, 12:28am UTC](https://forum.kirupa.com/t/are-variables-automatically-initialized-to-false/129704/1 "2004-11-27T00:28:18Z")

</div>

to make sense of [this](http://www.kirupa.com/developer/mx/preloader_transition.htm)tutorial for further exploration on my own, could someone please explain the ‘!loaded’ part and how it can be evaluated as part of an if statement, without first being set to true or false? here is how it is used in the tutorial

onClipEvent (enterFrame) {  
if (!loaded && this.\_url != \_root.\_url) {  
if (this.getBytesLoaded() == this.getBytesTotal()) {  
loaded = true;  
\_root.transition.gotoAndPlay(“opening”);  
}  
}  
}

how does flash figure out whats up with the ‘!loaded’ if it hasnt been assigned a value yet?

-mike :puzzle:
