# Loading .jpg dynamically

**URL:** <https://forum.kirupa.com/t/loading-jpg-dynamically/13680>\
**Category:** flash\
**Created:** [February 16, 2003, 9:36pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680 "2003-02-16T21:36:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DForm](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@DForm](https://forum.kirupa.com/u/DForm)\
**Post date:** [February 16, 2003, 9:36pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/1 "2003-02-16T21:36:16Z")

</div>

Hi I did the “Loading .jpg dynamically with Flash MX tutorial” and everything works fine. I used it to make a photogallery. The problem is that once I leave the photo section of my site (by clicking a link) and go to the home page (for example) the picture is still in its place. How do I get it to dissapear after I’m done when I switch pages.

Thanks

---

<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, 2003, 9:44pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/2 "2003-02-16T21:44:45Z")

</div>

you have to either move, hide or unload the MC that holds the pics (photo)

//you can set alpha to zero  
on(release){  
\_root.photo.\_alpha=0;  
}

//or you can put a blank frame in the photo MC and send it to that:

\_root.photo.gotoAndStop(“blank”);

hope this helps…  
-mojo

---

<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, 2003, 9:47pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/3 "2003-02-16T21:47:12Z")

</div>

or unload the jpg’s when you don’t need them anymore

instance.unloadMovie()

---

<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, 2003, 11:04pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/4 "2003-02-16T23:04:15Z")

</div>

Thanks

I used Kax’s method and put the code into each links actionscript.

Is there anyway to make the photo’s fade in and out using this method?

---

<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, 2003, 11:08pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/5 "2003-02-16T23:08:05Z")

</div>

could you be more specific ?? 🙂

load jpg … fade in … fade out … unload jpg ??

---

<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, 2003, 11:12pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/6 "2003-02-16T23:12:24Z")

</div>

I have the photos linked to a button. Is it possible to click the button and make the photo fade in, then when I click a different button for another picture I want the photo on the screen to fade out, and the new photo to fade in.

Thanks

---

<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, 2003, 11:22pm UTC](https://forum.kirupa.com/t/loading-jpg-dynamically/13680/7 "2003-02-16T23:22:39Z")

</div>

ok … i think i got it now 🙂

i guess a prototype would be the easier way … give me some time and i’ll see what to do 😉
