# AS for showing & hiding

**URL:** <https://forum.kirupa.com/t/as-for-showing-hiding/158127>\
**Category:** flash\
**Created:** [August 7, 2005, 11:28am UTC](https://forum.kirupa.com/t/as-for-showing-hiding/158127 "2005-08-07T11:28:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vintage](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vintage](https://forum.kirupa.com/u/vintage)\
**Post date:** [August 7, 2005, 11:28am UTC](https://forum.kirupa.com/t/as-for-showing-hiding/158127/1 "2005-08-07T11:28:22Z")

</div>

Im a little stuck on a little thingy Im working on.

On my main scene are 20 objects visible.  
I have a var thats named “totaal”.  
When totaal is less than 2, then I want the objects 2 till 20,  
instanceName1 \_visible=false;  
When totaal is less than 3, the objects 3 till 20 invisible, etc etc.

I can offcourse write a huge script with all simular lines, but maybe its possible to do this with an array or something.

Can anyone point me in the right direction ?  
thx in advance
