9 Replies Latest reply on Mar 21, 2011 11:00 AM by Ned Murphy

    See through objects

    Jos1986

      Hey all,

      I can't seem to figure out how to create the following: Picture 1 is on top of picture 2. I want to create a rectangle that hovers over pic1; showing pic2; only within that rectangle. So inside the rectangle that hovers over pic 1, the pic below will be shown.

      Perhaps one of you knows a way out!

      Thanks a lot!

        • 1. Re: See through objects
          Ned Murphy Adobe Community Professional & MVP

          You actually want to have pic2 sitting atop pic1 and use a mask (your rectangle) for pic2.  That way, only what is under the mask will show.

           

          To do this with pic2 underneath you would have to mask pic1 using the opposite of the rectangle... meaning you'd have a large rectangle that you cut out the see-thru rectangle and mask pic1 with that large rectangle (with the square hole in it).

          • 2. Re: See through objects
            Jos1986 Level 1

            Thanks heaps for the quick reply; that's exactly what I was looking for.

            • 3. Re: See through objects
              Ned Murphy Adobe Community Professional & MVP

              You're welcome

              • 4. Re: See through objects
                Jos1986 Level 1

                Still one question: what if i didn't want to apply this in time; but create a functionality in which the rectangle can be moved freely/randomly

                • 5. Re: See through objects
                  Ned Murphy Adobe Community Professional & MVP

                  That shouldn't be a problem.  As long as the mask is a mask, it can be moved/animated and still work the same.

                  • 6. Re: See through objects
                    Jos1986 Level 1

                    I have managed to pull it off, thanks to your support! One final question on this topic (I promise ). Is it possible to do the same, only with more, say four, pictures? A fixed picture; and coming in with your cursor from four different corners of the screen; four different pics appear?

                    • 7. Re: See through objects
                      Ned Murphy Adobe Community Professional & MVP

                      I like to think just about anything is possible, though I can't follow what you are describing.  If what displays would be dependent on where the mouse started from, you'd need to deal with creating the logic necessary to manage that.

                      • 8. Re: See through objects
                        Jos1986 Level 1

                        Thanks again for your time and expertise. Let me elaborate a bit more. I'm trying to compare four different future demographic scenario's to the current situation. I have manged to create a swf file (using code from another website... By no means am i able to write code myself), in which the current situation is visible and one of the four future scenarios for 2100 becomes visible when the cursor enters the object from below.

                        Keeping the current demographic situation as as starting point. It would be really nice if it was possible to have your cursor come in from the upper left corner to gradually show scenario A, the upper right corner scenario B, lower left scenaro C, lower right scenario D.

                        I hope you know how to figure this one out! If it is possible (anything is with adobe ), could you help be out a bit with the code?

                        • 9. Re: See through objects
                          Ned Murphy Adobe Community Professional & MVP

                          What you can probably do is have all of the 2100 scenarios within the same movieclip (1), as separate movieclips (a thru d), and have your mask assigned to the movieclip that contains them (1).  Then, in each corner area of the stage have an invisible button that you assign a rollover interaction for to set the visibility of the movieclips (a thru d) inside of (1) such that only one of the four is visible.