# How do i write this?

**URL:** https://forum.kirupa.com/t/how-do-i-write-this/205861
**Category:** Uncategorized
**Created:** [November 2, 2006, 6:54pm UTC](https://forum.kirupa.com/t/how-do-i-write-this/205861 "2006-11-02T18:54:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![waynebrady](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@waynebrady](https://forum.kirupa.com/u/waynebrady)
#### Post date: [November 2, 2006, 6:54pm UTC](https://forum.kirupa.com/t/how-do-i-write-this/205861/1 "2006-11-02T18:54:39Z")

</div>

```auto

function myFunction(myMC) {
	myMC.attachMovie(myMC, myMC, getNextHighestDepth());
}

myFunction(test);

```

I want this to attach a MC from my library called “test” to a movieclip holder called “test” on the canvas and have it named test. In the end, the instance path would be \_root.test.test.

The problem is myMC (the one right after the first parenthesis) is not populating correctly because it is not being read by Flash properly.

The typeof myMC is movieclip. I can String(myMC), but still no hope. How do I get this done?
