3 Replies Latest reply on Aug 26, 2014 9:09 AM by Preran

    MovieClip buttons inside a MovieClip button inside another MovieClip button

    andruihli Level 1

      I am trying to make a Portfolio of my study abroad experience and can get something right about the movie clip buttons inside each other. I have a button to click on titled "travel" and a window shows up with more movieclip buttons to organize different locations of pictures. I can click on the button to have to slide of pictures but nothing happens. I have the "turnOffAllButtons"  coding and  also have the coding for stay clicked, but I can't get the 3rd set to show up. what am i not doing?

      I don't have any errors or output comments showing up

        • 1. Re: MovieClip buttons inside a MovieClip button inside another MovieClip button
          Ned Murphy Adobe Community Professional & MVP

          You should  trace out the event.target of the clicks to see which objects you are truly interacting with.  You should show an example of the coding structure and explain how the objects involved coexist.

          1 person found this helpful
          • 2. Re: MovieClip buttons inside a MovieClip button inside another MovieClip button
            andruihli Level 1

            I have it working now. what I did, I make a slideshow setup (gotoAndStop(1);) in a specific frame and the code I put in for the next, didnt work.

            this is was I have now, without the "turnOffAllButtons" coding:

             

            Main Button (actions Layer):

            stop();

            travelButton_mc.buttonMode=true;

             

            travelButton_mc.addEventListener(MouseEvent.ROLL_OVER, colorizetravelButton);

            function colorizetravelButton(givenEvent:MouseEvent){

              if (givenEvent.currentTarget.currentFrame != 50)

              travelButton_mc.gotoAndPlay(2);

            }

            travelButton_mc.addEventListener(MouseEvent.ROLL_OUT, decolorizetravelButton);

            function decolorizetravelButton(givenEvent:MouseEvent){

              if (givenEvent.currentTarget.currentFrame != 50)

              travelButton_mc.gotoAndPlay(21);

            }

             

            travelButton_mc.addEventListener(MouseEvent.CLICK, loadtravelLocations);

            function loadtravelLocations(givenEvent:MouseEvent){

              travelButton_mc.gotoAndStop(50);

              travelLocations_mc.gotoAndPlay(1);

            }

            Screen Shot 2014-08-25 at 4.40.37 PM.png

            Inside the travelLocations_mc I have currently one button to show a slide of pictures, this is the second layer of buttoncode:

            stop();

             

            scotlandButton_mc.buttonMode=true;

             

            scotlandButton_mc.addEventListener(MouseEvent.ROLL_OVER, colorizescotlandButton);

            function colorizescotlandButton(givenEvent:MouseEvent){

              if (givenEvent.currentTarget.currentFrame != 50)

              scotlandButton_mc.gotoAndPlay(2);

            }

            scotlandButton_mc.addEventListener(MouseEvent.ROLL_OUT, decolorizescotlandButton);

            function decolorizescotlandButton(givenEvent:MouseEvent){

              if (givenEvent.currentTarget.currentFrame != 50)

              scotlandButton_mc.gotoAndPlay(21);

            }

             

            scotlandButton_mc.addEventListener(MouseEvent.CLICK, loadscotlandInfoPage);

            function loadscotlandInfoPage(givenEvent:MouseEvent){

              scotlandButton_mc.gotoAndStop(50);

              scotlandInfoPage_mc.gotoAndPlay(1);

            }

            Screen Shot 2014-08-25 at 4.41.16 PM.png

            I turned the alpha up so you can see the mc that loads

            I currently have a keyframe at 60 with a code of stop(); so the travelLocations_mc will still

            Screen Shot 2014-08-25 at 4.41.35 PM.png

            does this make sense?

            1 person found this helpful
            • 3. Re: MovieClip buttons inside a MovieClip button inside another MovieClip button
              Preran Adobe Employee

              Hi andruhli,

               

              Thank you for sharing your solution with us.

               

              Thanks,

              Preran