Loading the library content

Hi everyone I wanted to know how you would dynamically load a button from your library to the main scene. What I am trying to acomplish is on mouse press I want to load scroll contenet plus a button from the library. I got the content to work but not the button. How do I do this? Thanks,
Marc:asian:

MovieClip.attachMovie :wink:

Thanks for the quick reply. I tried to put it in my presentation like this
[AS]on (press) {
_root.myMovieClip.attachMovie(“creationsbutton”,“creations2”,2);
_root.myMovieClip._x = 150.4;
_root.myMovieClip._y = 105.2;
_root.twinkle2.unloadMovie(“islandsbutton.swf”);
_root.twinkle1.loadMovie(“creationThumbs.swf”);
_root.textbox.setScrollContent(“creation”);
}
[/AS]

So the first part would load my button from the library into a certain location and the second part changes the scroll contenet. And unloads an existing movie. Well, in theory… but that is what I want. But it still does not work. What am I doing wrong? Thanks again,
Marc:asian:

go in your library, right click on the creationsbutton and go to linkage. then type in creationsbutton there. now try it. it should work!
_b2

I know I am still doing some thing wrong but I just changed the linkage and it still does not work. Is it just me? or does it load and I can’t see it? sorry to bother you again,
marc

the instance name of your movie isn’t, “myMovieClip”, is it?
the movie clip instance name needs to be where it says _root.myMovieClip…
if your mc instance name an the linkage name is the same you need to change one of them because that is to confusing (nothing wrong syntaxically…if that is a word).
rename the linkage to “creationsbutton_link” and make sure your instance name is, “creationsbutton”.

it should look like this:

_root.creationsbutton.attachMovie(“creationsbutton_link”,“creations2”,2")

instead of:

_root.myMovieClip.attachMovie(“creationsbutton”,“creations2”,2)

hope that helps
_brian2

I am gulilty of what you said, I did name my movie clip “myMovieClip” huh…Sorry.hehe… It still is not working so here is my new scripting and a picture of my changes. I am so sorry to bother you again but I fell myself getting closer.

thanks again.
[AS]on (press) {
_root.creationsbutton.attachMovie(“creationsbutton_link”,“creations2”,2);
_root.creationsbutton._x = 150.4;
_root.creationsbutton._y = 105.2;
_root.twinkle2.unloadMovie(“islandsbutton.swf”);
_root.twinkle1.loadMovie(“creationThumbs.swf”);
_root.textbox.setScrollContent(“creation”);
}[/AS]
thanks again,
Marc

awesome!

why don’t you attach your .fla? it would be easier for us to find out what’s wrong… :-\