5 Replies Latest reply on Dec 7, 2009 5:00 AM by Ned Murphy

    Clicking through to the next layer

    kptgreg2 Level 1

      I designed an all flash website and coded in AS2 and when someone clicks to play a movie in my Commercials section, I fade in a solid black background (which is a Symbol - Graphic) and the video (FLV) plays.  I noticed that while the video is playing if you click on the solid black background it clicks through to the layer below and sometimes you can click on another button/video.  I don't understand this because shouldn't the solid black background which covers the whole screen prevent this click through?  Is there some sort of code or something I need to tell the solid black background to not click through.

       

      Here is the website, click on any of the nine videos and then click in the black area around the video to see the problem, thanks in advance:

      http://www.giantsteps.us/test.html#commercials

        • 1. Re: Clicking through to the next layer
          Ned Murphy Adobe Community Professional & MVP

          If you have active buttons behind an inactive element, the buttons can still be interacted with.  You need to either disable the buttons while they are covered or assign some interactive code to the ackground so that it blocks access to the buttons.  To do the latter you need to make the background a movieclip as a minimum so that you can assign code to it.

          • 2. Re: Clicking through to the next layer
            kptgreg2 Level 1

            thanks a lot for the reply, if I make the background a movie clip will that stop it from clicking through?  It seems like a pain to write code to make all the buttons below it inactive.  Is there some code I can apply that is like "no click, nothing happens."?

            • 3. Re: Clicking through to the next layer
              Ned Murphy Adobe Community Professional & MVP

              Try turning your background graphic that covers the buttons into a movieclip .  Give it an instance name and place this code in it the timeline that contains it (this example uses "bg_mc" as an instance name for it)...

               

              bg_mc.useHAndCursor = false;

              bg_mc.onRollOver = function(){

                   // do nothing

              }

              1 person found this helpful
              • 4. Re: Clicking through to the next layer
                kptgreg2 Level 1

                thanks for the help, the code didn't quite solve the problem, I wound up making the black background a button and that worked because it was active but did nothing.

                • 5. Re: Clicking through to the next layer
                  Ned Murphy Adobe Community Professional & MVP

                  It would have worked if you did it properly, but creating it as a button saves you the effort of coding it to act like one.  You still might want to assign it an instance name and assign the code to not use the hand cursor.   That way people won't be wondering why it acts like a button when they move over it...

                   

                  objectName.useHandCursor = false;

                  1 person found this helpful