# Loading the library content

**URL:** https://forum.kirupa.com/t/loading-the-library-content/20535
**Category:** Uncategorized
**Created:** [May 9, 2003, 9:48pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535 "2003-05-09T21:48:04Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Ainriail](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Ainriail](https://forum.kirupa.com/u/Ainriail)
#### Post date: [May 9, 2003, 9:48pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/1 "2003-05-09T21:48:04Z")

</div>

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:

---

<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 9, 2003, 10:05pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/2 "2003-05-09T22:05:02Z")

</div>

[MovieClip.attachMovie](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary508.html) 😉

---

<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 9, 2003, 11:06pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/3 "2003-05-09T23:06:59Z")

</div>

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:

---

<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 9, 2003, 11:13pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/4 "2003-05-09T23:13:50Z")

</div>

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

---

<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 9, 2003, 11:18pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/5 "2003-05-09T23:18:06Z")

</div>

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

---

<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 9, 2003, 11:27pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/6 "2003-05-09T23:27:26Z")

</div>

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

---

<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 9, 2003, 11:39pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/7 "2003-05-09T23:39:57Z")

</div>

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

---

<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 9, 2003, 11:43pm UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/8 "2003-05-09T23:43:32Z")

</div>

awesome!

---

<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 10, 2003, 12:12am UTC](https://forum.kirupa.com/t/loading-the-library-content/20535/9 "2003-05-10T00:12:28Z")

</div>

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