# attachMovie problem

**URL:** <https://forum.kirupa.com/t/attachmovie-problem/205038>\
**Category:** Uncategorized\
**Created:** [October 25, 2006, 4:25pm UTC](https://forum.kirupa.com/t/attachmovie-problem/205038 "2006-10-25T16:25:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverneo188](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@silverneo188](https://forum.kirupa.com/u/silverneo188)\
**Post date:** [October 25, 2006, 4:25pm UTC](https://forum.kirupa.com/t/attachmovie-problem/205038/1 "2006-10-25T16:25:47Z")

</div>

i have inserted this code into my button game

```auto

on(release){
	if (score>=200){
	attachMovie(secret 200,popbutton,depth,initObject);
	}
}

```

whenerver i test it i get this error report.

> 

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 43: ‘)’ or ‘,’ expected  
attachMovie(secret 200,testFlash,3,initObject);

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 45: Unexpected ‘}’ encountered  
}

Total ActionScript Errors: 2 Reported Errors: 2

what’s wrong? I don’t get it, and what am I supposed to put in depth and initOnject

---

<div class="post-metadata">

**Author:** ![Phat7](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Phat7](https://forum.kirupa.com/u/Phat7)\
**Post date:** [October 25, 2006, 8:59pm UTC](https://forum.kirupa.com/t/attachmovie-problem/205038/2 "2006-10-25T20:59:50Z")

</div>

```auto
on(release){
    if (score>=200){
    attachMovie("secret_200","popbutton",this.getNextHighestDepth());
    }
}

```

Also you can not have spaces in movieclip names. See **secret\_200** above.
