2 Replies Latest reply on Oct 14, 2009 1:36 AM by dougalputt

    Z-index layering moving images




      I am hoping someone can help me out! Basically I have an application to build that has a frame image (img1) with a transparent centre, an image (img2) within that centre area and another image (img3), the same size as img2, that hides in behind img2.


      When a button is clicked, img2 will move up and reveal img3. When the button is clicked again img2 moves back down and covers over img3 again.


      The problem is to do with the layering of the images. I want img2 to always lay over img3 so that when it is back down img3 is completely hidden. I am able to do all of this up to this point. The problem lies is that when img2 is moving up, I want it to move up in behind the top of the outer frame (img1), but all I can get is the image moving up over the top of the frame and not slotting in behind it.


      I hope I have explained this clearly! Not so easy!


      I tried the WipeUp effect, which was close to what I want, but the image winds up with the top of the image remaining until the last moment before it disappears. I want the image to roll all the way the way a window blind would so that you would always see the bottom of the image until it reached the top.


      Does anyone have any ideas of how to do this?


      Thank you so much in advance!

        • 1. Re: Z-index layering moving images
          WordRad Level 1

          I know that you shouldn't have to use WipeUp effects to resolve z-order issues.  To guarantee that img2 stays behind img1 it would seem all you would have to do is call containerX.addChild(img2);  containerX.addChild(img1); in that order,  and img1 should stay in front of img2, right?  Would a mouse click on img2 bring it to the top of the Z order?


          Why couldn't adobe pay one person  to hang out on this forum and answer everyone's questions authoritatively.

          • 2. Re: Z-index layering moving images
            dougalputt Level 1

            Would be great if someone from Adobe was on here yes!


            I will give your suggestion a try later today, but I have a feeling that when I 'move' img2 up it somehow changes it's z-index. I also give the user the option to change the frame to a different style. Even though it stays staic on the screen (has no effects - all I do is change the source of the image), I think that changing the source of it also changes its z-index and brings it to the front.


            Very frustrating. I'll let you know how I get on with your suggestion later - thanks for taking the time in trying to help me.