4 Replies Latest reply on May 27, 2006 11:05 PM by kglad

    Problem with to functions on one Movie Clip

      Hi, I hope some one can help me with this problem!!!!


      I have to movie clips

      _root.inhalt.motivcontainer and an other one attached to this one
      _root.inhalt.motivcontainer.buttonLinksUnten

      now I move both movie clips with:

      _root.inhalt.motivcontainer.onPress = function(){
      startDrag (_root.inhalt.motivcontainer, false, 135, 75, 198, 230);
      };
      _root.inhalt.motivcontainer.onRelease = _root.inhalt.motivcontainer.onReleaseOutside = function (){
      this.stopDrag();
      };
      _root.inhalt.motivcontainer.onMouseMove = function(){
      updateAfterEvent();
      };

      my problem is to get an other function on the second movie clip?

      Maybe one of you have an different solution to drag and trop an movie clip and have the possibility to touch the clip on the corner to scale it.

      sorry about my english.

      Thanks for your help Rene
        • 1. Re: Problem with to functions on one Movie Clip
          kglad Adobe Community Professional & MVP
          your parent movieclip (_root.inhalt.motivcontainer) will intercept all mouse events assigned to the child movieclip (_root.inhalt.motivcontainer.buttonLinksUnten).

          to resolve either create another movieclip on the parents timeline that is on a layer below all visible content of buttonLinksUnten and assign the above handlers to this "new" child or use a hitTest for the parent or the child instead of two sets of mouse handlers.
          • 2. Re: Problem with to functions on one Movie Clip
            Rothrock Level 5
            The problem is there is no part of buttonLinksUnten that isn't part of motivcontainer. So there is no way you will be able to do that with your current structure.

            I'm not sure I understand exactly what you are trying to do, but a simple reorganization might have you putting both of these clips inside another clip. Then have the drag behavior drag the parent of both and whatever you are trying to do with the other clip do that as well.

            PS: It is interesting to me that you use the global method startDrag, but that you use the MovieClip method for stopDrag(). To my eye your code would be prettier if you did:

            this.startDrag(false, 135, 75, 198, 230);
            1 person found this helpful
            • 3. Re: Problem with to functions on one Movie Clip
              Thanks for your hints. It is working now and I will try to get a better code.

              I have an MovieClip with an small button on each corner now and I can move it. Now I have to make it scalable.

              Rene
              • 4. Re: Problem with to functions on one Movie Clip
                kglad Adobe Community Professional & MVP
                you're welcome.
                1 person found this helpful