# Fading one jpeg in on top of another on(press)

**URL:** https://forum.kirupa.com/t/fading-one-jpeg-in-on-top-of-another-on-press/121573
**Category:** Uncategorized
**Created:** [September 4, 2004, 1:31am UTC](https://forum.kirupa.com/t/fading-one-jpeg-in-on-top-of-another-on-press/121573 "2004-09-04T01:31:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![3dron](https://avatars.discourse-cdn.com/v4/letter/3/2acd7d/32.png) [@3dron](https://forum.kirupa.com/u/3dron)
#### Post date: [September 4, 2004, 1:31am UTC](https://forum.kirupa.com/t/fading-one-jpeg-in-on-top-of-another-on-press/121573/1 "2004-09-04T01:31:22Z")

</div>

I have looked all over this forum and can’t find what I am looking for (though undoubtedly someone will point me to another thread.)

I have a dozen buttons of materials options. When the user hits one I want an external jpeg to fade into a fix position mc, over the previous jpeg their. And as the user keeps hitting the buttons jpeg upon jpeg will fade in on top.

I am using

init = function () {  
Img1.myContainer = Img1.createEmptyMovieClip(“cont”, 1);  
Img1.myContainer.loadMovie(\_global.imagename);  
};

and

on(press) {  
\_global.imagename = “myImage.jpg”;  
init();  
}  
.

But this just pops the next image in with a gap in between.

Don’t I have to create movieclips one level higher than the previous, then after fade up of alpha, unload previous mc. I don’t want dozens of mcs to just keep layering one on another?

A preload would be nice for the future (without a status message.) But for now the app runs locally.

Thanks for any help

Ron R. Jr.

P.S. I tried using [http://www.kirupaforum.com/forums/showthread.php?s=&threadid=33872](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=33872) but I am not sure if it does what I need as I could not figure out how to point the functions to an external mc. I replaced all instances of “this” text with “Img1” to point them to my \_root.Img1 mc but the fadeIn function did not work.
