Easy | Problem loading an MC from the Library into Movie

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

use attachMovie instead of duplicateMovieClip. :wink:

Woot it worked !!!

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

you’re welcome. =)

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

Here you go

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

HTH

thanks

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);
}

*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