# Selecting from library

**URL:** <https://forum.kirupa.com/t/selecting-from-library/42973>\
**Category:** Uncategorized\
**Created:** [February 16, 2004, 10:13pm UTC](https://forum.kirupa.com/t/selecting-from-library/42973 "2004-02-16T22:13:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pickkill](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@pickkill](https://forum.kirupa.com/u/pickkill)\
**Post date:** [February 16, 2004, 10:13pm UTC](https://forum.kirupa.com/t/selecting-from-library/42973/1 "2004-02-16T22:13:30Z")

</div>

whats the actionscript to display a picture from the library on the flash page?

---

<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:** [February 16, 2004, 10:24pm UTC](https://forum.kirupa.com/t/selecting-from-library/42973/2 "2004-02-16T22:24:00Z")

</div>

you can do it like this:

Make a new mc (movie clip). Open this mc. Add the image from the library to this mc, on the stage. Now say that you have called this mc ‘imageHolder’ as its instance name.

Use this code to attach this mc to the movie:

[AS]attachMovie(“imageHolder”,“imageHolder”,1);[/AS]

---

<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:** [February 16, 2004, 10:29pm UTC](https://forum.kirupa.com/t/selecting-from-library/42973/3 "2004-02-16T22:29:48Z")

</div>

sorry, i meant from a button. so something like this  
on(release) {  
attachMovie(“movie1”,1);   
}

but it doesnt work. what is the actual AS?

---

<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:** [February 16, 2004, 10:39pm UTC](https://forum.kirupa.com/t/selecting-from-library/42973/4 "2004-02-16T22:39:51Z")

</div>

Try this:

[AS]on(release) {  
attachMovie(“movie1”, “movie1”, 1);  
}[/AS]

You need to give it a new instance name, here we are giving it the same name again ‘movie1’ (the 2nd parameter for attachMovie method)
