# Help with loading external jpegs

**URL:** <https://forum.kirupa.com/t/help-with-loading-external-jpegs/82506>\
**Category:** Uncategorized\
**Created:** [March 10, 2005, 9:00pm UTC](https://forum.kirupa.com/t/help-with-loading-external-jpegs/82506 "2005-03-10T21:00:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamblong](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/adamblong/32/1082_2.png) [@adamblong](https://forum.kirupa.com/u/adamblong)\
**Post date:** [March 10, 2005, 9:00pm UTC](https://forum.kirupa.com/t/help-with-loading-external-jpegs/82506/1 "2005-03-10T21:00:27Z")

</div>

Hi, I am trying to load some external jpegs on a site and I have the function done for MX  
function loadPic(mc, picName) {  
var myFile = “images/”+picName+".jpg";  
mc.loadMovie(myFile);  
}

I also have the button code done.

button1.onRelease=function() {  
loadPic(“fam1”);  
}

I’ve set up on the main timeline a frame/layer just for actionscript and the button I want to launch the image into the “mc” is down 2 levels. Where do I put the button code (MX) and the mc movie clip? Do they all have to be on the main timeline or can I somehow tell Flash where the button is and how to find the image and the function? I’m new and confused. Please help, I can feel myself going gray as I write.

Thanks,  
Adam
