# Here's a tricky one - loading images into library dynamically

**URL:** <https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527>\
**Category:** flash\
**Created:** [April 5, 2006, 6:51pm UTC](https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527 "2006-04-05T18:51:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SAVAGER](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SAVAGER](https://forum.kirupa.com/u/SAVAGER)\
**Post date:** [April 5, 2006, 6:51pm UTC](https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527/1 "2006-04-05T18:51:45Z")

</div>

Ok - I’ve stumbled upon a tricky situation.

Basically I have Button components that are populated dynamically. The buttons need to each have an icon (using the button.icon property).

The icon however, is retrieved via webservices so all I recieve is a URL to the jpg that needs to be loaded as the icon. When using the icon property, you load an instance of something in your library over the top of your button.

So I was wondering if there was a way to retrieve this url, and load it into the library which would then allow me to use it as an icon???

Any suggestions would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![gvozden](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gvozden/32/1084_2.png) [@gvozden](https://forum.kirupa.com/u/gvozden)\
**Post date:** [April 5, 2006, 7:46pm UTC](https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527/2 "2006-04-05T19:46:40Z")

</div>

use loadMovie command

[http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary423.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary423.html)

you can use loading jpeg to movieclip (button) instance name mc like

mc.loadMovie(url)

where url is image url (etc. “[http://www.ax.com/1.jpg](http://www.ax.com/1.jpg)”)

you can additionaly state movieclips level but if you made your buttons earlier I suppose you defined it already so you only need to load jpeg

---

<div class="post-metadata">

**Author:** ![SAVAGER](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SAVAGER](https://forum.kirupa.com/u/SAVAGER)\
**Post date:** [April 5, 2006, 7:51pm UTC](https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527/3 "2006-04-05T19:51:27Z")

</div>

thanks for your help gvozden but that’s not exactly what I need to do.

I understand loadMovie but these are not button Movieclips, they are button components, and with those, when attaching an icon, you need a linkage id.

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 5, 2006, 7:54pm UTC](https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527/4 "2006-04-05T19:54:19Z")

</div>

then no.

---

<div class="post-metadata">

**Author:** ![gvozden](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gvozden/32/1084_2.png) [@gvozden](https://forum.kirupa.com/u/gvozden)\
**Post date:** [April 5, 2006, 8:20pm UTC](https://forum.kirupa.com/t/heres-a-tricky-one-loading-images-into-library-dynamically/184527/5 "2006-04-05T20:20:38Z")

</div>

svg r u sure…  
you can always extend component or place movieclips over it…  
but hey  
maybe I’m wrong
