# Correct syntax

**URL:** <https://forum.kirupa.com/t/correct-syntax/208017>\
**Category:** flash\
**Created:** [November 24, 2006, 1:04am UTC](https://forum.kirupa.com/t/correct-syntax/208017 "2006-11-24T01:04:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjiminyjimjim](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jimjiminyjimjim](https://forum.kirupa.com/u/jimjiminyjimjim)\
**Post date:** [November 24, 2006, 1:04am UTC](https://forum.kirupa.com/t/correct-syntax/208017/1 "2006-11-24T01:04:18Z")

</div>

I want to make 5 out of 10 movieclips invisible.

I know this works for each movie :  
item1.\_visible = false;  
item2.\_visible = false;  
etc

But whats the correct syntax to do it in the loop. This seems to clear all 10 movieclips.

```auto
  

for (var y = 0; y<5; y++) {
	
	["item"+(y)]_visible = false;
   }

```

any ideas greatly appreciated. Thanks.
