# If and if and if - must be an easier way?

**URL:** <https://forum.kirupa.com/t/if-and-if-and-if-must-be-an-easier-way/192717>\
**Category:** Uncategorized\
**Created:** [June 30, 2006, 1:44pm UTC](https://forum.kirupa.com/t/if-and-if-and-if-must-be-an-easier-way/192717 "2006-06-30T13:44:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iflashtrated](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@iflashtrated](https://forum.kirupa.com/u/iflashtrated)\
**Post date:** [June 30, 2006, 1:44pm UTC](https://forum.kirupa.com/t/if-and-if-and-if-must-be-an-easier-way/192717/1 "2006-06-30T13:44:15Z")

</div>

Could anyone offer advise as to a more efficient way of writing the following please:

function trailReveal() {  
if (\_root.mover.hitTest(\_root.dot1)) {  
\_root.dot1.\_visible = true;  
//trace(“trail left3”);  
}  
if (\_root.mover.hitTest(\_root.dot2)) {  
\_root.dot2.\_visible = true;

}  
if (\_root.mover.hitTest(\_root.dot3)) {  
\_root.dot3.\_visible = true;

}  
if (\_root.mover.hitTest(\_root.dot4)) {  
\_root.dot4.\_visible = true;

}  
}
