7 Replies Latest reply on Feb 19, 2007 10:00 PM by kglad

    getNextHighestDepth problem

    Asesino
      I have a problem.
      I have created 14 movie clip buttons. Each button has a roll over effect when you mouse over. When you mouse over there is a graphic that gets bigger and then gets smaller when you roll out. The problem is each movie is on it's own layer and when I roll over a movie, one will zoom under a movie and hide the image and if I put the movie on top of that movie's layer it'll cause the same problem for a diffrent one so on and so forth.

      I've tried placing this code one the first frame where the clips reside

      movieclip.getNextHighestDepth()

      and this one too

      movieclip.swapDepths(_root.getNextHighestDepth());

      but it doesn't always work. How can I get the clips to zoom on top of each other as you mouse over each individual one?
        • 1. Re: getNextHighestDepth problem
          kglad Adobe Community Professional & MVP
          movieclip.swapDepths(_root.getNextHighestDepth()); will work unless you're using a v2 component. in that situation you'll need to use the depth manager or manage the depths yourself.

          that swapDepths() method should be executed on rollOver.
          • 2. getNextHighestDepth problem
            Asesino Level 1
            "movieclip.swapDepths(_root.getNextHighestDepth()); will work unless you're using a v2 component. in that situation you'll need to use the depth manager or manage the depths yourself."

            How do I know if I'm using a v2 component? And If I am how do I manage the depths myself?

            "that swapDepths() method should be executed on rollOver. "

            I do not have a rollOver command in the movie clip button . this is how my movie clip zooms in and out of it's.



            in the actions layer, Frame 1 I have a stop action. On Frame 7 I have a stop action on Frame 11 I have a gotoAndStop(1); action and at Frame 12 I have stop command. This is basiclly a movie clip that acts like a button.

            If I place a rollOver command on the movie clip it will not work.

            You've help me in the past kglad, I appreicate all the help!

            ****************************************************************************************** ***************************************
            This is the code I have on the button inside the movie clip. How do I get it work to swap the depths. I've tried this but it makes the movie clip go zoom in and out endlessly when I mouse over.

            Here is my code for the button.


            //tells this MC to play frame 2 on roll over
            on (rollOver) {gotoAndPlay(2);
            }


            //tell this MC to play frame 8 on roll out
            on (rollOut) {gotoAndPlay(8);
            }

            //tell this MC to stop at frame 16 on release which
            // disables the button because the button is not on frame 16.
            // Checks to see if the other buttons have stopped at frame 16,
            // if so, then play the roll out effect from frame 8,
            // if not, don't do anything at all


            on (release) {_cabodraft.gotoAndPlay(19);


            if (_root.butt1MC._currentFrame == "15") {
            _root.butt1MC.gotoAndPlay(7);
            }
            if (_root.butt3MC._currentFrame == "15") {
            _root.butt3MC.gotoAndPlay(7);
            }


            //changes the contents of "statusBox"
            _root.statusBox.text = "BUTTON 2 PRESSED"
            }
            on (rollOver) {.getNextHighestDepth();


            }



            Here is the link , if you mouse over "Marketing Communications" you'll see what it does

            http://www.acottageflorist.net/Temp/Burnet3.html

            Thanks
            • 3. Re: getNextHighestDepth problem
              kglad Adobe Community Professional & MVP
              1. are you using any components? if so, which?

              2. you can manage your own depths by using a variable to track and assign the current greatest depth.

              3. on (rollOver) {gotoAndPlay(2);} is your rollOver code where you should be swapping depths.
              • 4. Re: getNextHighestDepth problem
                Asesino Level 1
                1. are you using any components? if so, which?

                I am not using any componets.

                2. you can manage your own depths by using a variable to track and assign the current greatest depth.

                How do you assign your a variable to track and assign the current greatest depth?

                3. on (rollOver) {gotoAndPlay(2);} is your rollOver code where you should be swapping depths.

                If this is where I need to swap depths, how does it need to be declared? What does the code look like?

                This is what i put after on (rollOver) {gotoAndPlay(2);
                }

                on (rollOver) {mark.swapDepths(_root.getNextHighestDepth());
                }

                thanks for your help
                • 5. Re: getNextHighestDepth problem
                  kglad Adobe Community Professional & MVP
                  no components, you can use getNextHighestDepth():

                  • 6. Re: getNextHighestDepth problem
                    Asesino Level 1
                    kglad, your the Flash Mastah!!!!!!!!!!!!
                    • 7. Re: getNextHighestDepth problem
                      kglad Adobe Community Professional & MVP
                      you're welcome.