# If...Else Statments

**URL:** <https://forum.kirupa.com/t/if-else-statments/231704>\
**Category:** flash\
**Created:** [July 6, 2007, 10:43pm UTC](https://forum.kirupa.com/t/if-else-statments/231704 "2007-07-06T22:43:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcusJones](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@marcusJones](https://forum.kirupa.com/u/marcusJones)\
**Post date:** [July 6, 2007, 10:43pm UTC](https://forum.kirupa.com/t/if-else-statments/231704/1 "2007-07-06T22:43:21Z")

</div>

Anybody know how I can clean up this block of code

```auto
if(imageInt0 == undefined){
				trace("image0 undefined");
			} else{
				loadImage_mc.imageEmpty0.attachMovie("imageInt0_mc", "imageInt0_mc1", newDepth);	
			}
			
			if(imageInt1 == undefined){
				trace("image1 undefined");
			} else{
				loadImage_mc.imageEmpty1.attachMovie("imageInt1_mc", "imageInt1_mc1", newDepth);	
			}
			if(imageInt2 == undefined){
				trace("image2 undefined");
			} else{
				loadImage_mc.imageEmpty2.attachMovie("imageInt2_mc", "imageInt2_mc1", newDepth);	
			}
			
			if(imageInt3 == undefined){
				trace("image3 undefined");
			} else{
				loadImage_mc.imageEmpty3.attachMovie("imageInt3_mc", "imageInt3_mc1", newDepth);	
			}
			if(imageInt4 == undefined){
				trace("image4 undefined");
			} else{
				loadImage_mc.imageEmpty4.attachMovie("imageInt4_mc", "imageInt4_mc1", newDepth);	
			}
			
			if(imageInt5 == undefined){
				trace("image5 undefined");
			} else{
				loadImage_mc.imageEmpty5.attachMovie("imageInt5_mc", "imageInt5_mc1", newDepth);	
			}

```

Thanks in advance.
