# Easy | Problem loading an MC from the Library into Movie

**URL:** <https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149>\
**Category:** flash\
**Created:** [May 18, 2003, 1:29am UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149 "2003-05-18T01:29:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obelisk](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@Obelisk](https://forum.kirupa.com/u/Obelisk)\
**Post date:** [May 18, 2003, 1:29am UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/1 "2003-05-18T01:29:55Z")

</div>

I am trying to do something fairly simple. However right now it is not working for me.

I am trying to load and duplicate a movie contained in the Library. I would like to be able to do so without dragging an instance of it into the desktop. I have gone ahead and made the linkage to javascript under the properties.

Here is my code below:

duplicateMovieClip(“menuInstance”, n, n\*10);

Any help is greatly appreciated

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 18, 2003, 2:12am UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/2 "2003-05-18T02:12:02Z")

</div>

use attachMovie instead of duplicateMovieClip. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 18, 2003, 3:05am UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/3 "2003-05-18T03:05:26Z")

</div>

Woot it worked !!!

Thanks for the help… Been staring at my screen too long

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 18, 2003, 4:07am UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/4 "2003-05-18T04:07:05Z")

</div>

you’re welcome. =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 4:29pm UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/5 "2003-05-19T16:29:38Z")

</div>

what is the string to take a movieclip from the library and have it load and play at co-ordinates 0, 0?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 4:33pm UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/6 "2003-05-19T16:33:27Z")

</div>

Here you go

attachMovie(“libraryName”, “newMC”, 2);  
setProperty(“newMC”, \_y, 0);  
setProperty(“newMC”, \_x, 0);

HTH

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 4:34pm UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/7 "2003-05-19T16:34:54Z")

</div>

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 4:40pm UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/8 "2003-05-19T16:40:33Z")

</div>

I can’t seem to make it work. Below is what I ahve on my button and nothing loads. I presume the 2 represents the layer it loads on?

on(release){  
\_parent.scaler.target\_xscale = 200;  
\_parent.scaler.target\_yscale = 200;

```
_parent.attachMovie("05-artistic", "newMC", 2);

```

\_parent.setProperty(“newMC”, \_y, 0);  
\_parent.setProperty(“newMC”, \_x, 0);  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 4:47pm UTC](https://forum.kirupa.com/t/easy-problem-loading-an-mc-from-the-library-into-movie/21149/9 "2003-05-19T16:47:48Z")

</div>

> \*Originally posted by zephn \*  
> \*\*I can’t seem to make it work. Below is what I ahve on my button and nothing loads. I presume the 2 represents the layer it loads on?

on(release){  
\_parent.scaler.target\_xscale = 200;  
\_parent.scaler.target\_yscale = 200;

```
_parent.attachMovie("05-artistic", "newMC", 2);

```

\_parent.setProperty(“newMC”, \_y, 0);  
\_parent.setProperty(“newMC”, \_x, 0);  
} \*\*

Make sure that the movie you are trying to attach has the correct properties ( i.e. has actionscript export enabled.)  
To do so right click on the movie in your library, click on linkage, and select export for actionscript. REmember to give it an identifier. In this case it would be 05-artistic.

Also give it a higher depth number 10 instead of 2.

HTH
