1 Reply Latest reply on Sep 8, 2006 11:50 AM by Newsgroup_User

    Please help

    02TransAm
      Hello! I am trying to make a menu bar in flash. I have a movie clip set to onRollover to attach another movie clip which is the drop down. Inside of this movie clip, it will not allow me to add a rollover function to this clip. See the attached code. Please help. I have been struggling with this all day!!!!
        • 1. Re: Please help
          Level 7
          The problem you are having is that the child clip (op1_mc) is considered
          part of the parent clip (dd1_mc). Meaning, if the two clips are
          separate on the stage with space between them and the mouse rolls off
          dd1_mc and then onto op1_mc you are infact entering dd1_mc inherently so
          dd1_mc's onRollover will fire (eg. you're still entering the house even
          if you are entering the kitchen thru the back door). If the child
          overlaps the parent in a way that the mouse never leaves dd1_mc as it
          goes into op1_mc then you won't have this problem. (eg. you enter the
          kitchen from the living room you never left the house.) Another problem
          you might be having is with scope. Try using trace statements to see
          what "this" resolves to in context. I can see that
          removeMovieClip(this.dd1_mc) towards the end of your script isn't quite
          right as "this" will resolve to dd1_mc which means this.dd1_mc doesn't
          exist. Just a few things to look at to get you in the right direction.
          Hope it helps.

          James O'Reilly
          www.jamesor.com



          02TransAm wrote:
          > Hello! I am trying to make a menu bar in flash. I have a movie clip set to
          > onRollover to attach another movie clip which is the drop down. Inside of this
          > movie clip, it will not allow me to add a rollover function to this clip. See
          > the attached code. Please help. I have been struggling with this all day!!!!
          >
          > stop();
          >
          > import mx.managers.DepthManager;
          >
          > this.attachMovie("dd1_id", "dd1_mc", 1, {_x:150,_y:170});
          >
          >
          > dd1_mc.onRollOver = function() {
          > this.gotoAndPlay("dd1_over");
          > menuBar_mc.setDepthTo(DepthManager.kTop);
          > this.attachMovie("op1_id", "op1_mc", 1, {_x:-90,_y:-100});
          > op1_mc.onRollover = function() {
          > this.gotoAndPlay("op1_over");
          > }
          > };
          >
          > dd1_mc.onRollOut = function() {
          > this.gotoAndPlay("dd1_up");
          > removeMovieClip(this.dd1_mc);
          > removeMovieClip(this.op1_mc);
          > };
          >


          --


          ___________________________________
          === James O'Reilly
          === SynergyMedia, Inc.