# Syntax error!

**URL:** <https://forum.kirupa.com/t/syntax-error/175517>\
**Category:** Uncategorized\
**Created:** [January 15, 2006, 11:15am UTC](https://forum.kirupa.com/t/syntax-error/175517 "2006-01-15T11:15:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [January 15, 2006, 11:15am UTC](https://forum.kirupa.com/t/syntax-error/175517/1 "2006-01-15T11:15:09Z")

</div>

```auto

function hideClips() {
 for (i=1; i<17; i++) {
  _root["b" add i]._visible = false;
  
 } 
}

```

This code is working fine in flash mx but in flash 8 generates an error like this

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: ‘]’ expected  
\_root[“b” add i].\_visible = false;  
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 10: Unexpected ‘}’ encountered  
}  
Total ActionScript Errors: 2 Reported Errors: 2

What is going wrong with. How to rewrite this code for flash 8 :whistle:
