11 Replies Latest reply on Dec 15, 2010 1:47 PM by kglad

    Can't click on any buttons inside draggable movieclip.

    atrzebunia

      I have a draggable movieclip, mc_PI on stage in which I have another movieclip, mc_PIcontainer into which I load an image.  I then place a few buttons, btn_Ant1, btn_Ant2, etc. inside mc_PI.

      mc_PI drags just fine within the bounds I specify, but I cannot click on any of the buttons that are located inside mc_PI.  I need the buttons to be inside mc_PI, because I need them to drag along with the image located in mc_PI.mcPIcontainer.  My code is:

       

      ///////////////////
      ////Draging////
      ///////////////////
      var container:MovieClip = mc_PI.mc_PIcontainer.createEmptyMovieClip("container", 1);
      var mcLoader:MovieClipLoader = new MovieClipLoader();
      mcLoader.addListener(this);
      mcLoader.loadClip("images/PI.jpg", mc_PI.mc_PIcontainer.container);

       

      function onLoadInit(mc:MovieClip)
      {
          mc.forceSmoothing = true;
          mc._quality = "BEST";
      }

       

      mc_PI.useHandCursor = false;
      mc_PI.onPress = function():Void
      {
          startDrag(this, false, -910, -1769, 1, 36);
      }

       

      mc_PI.onRelease = mc_PI.onRollOut = function():Void
      {
          stopDrag();
      }

       


      /////////////////////////
      ////Buttons//////////
      /////////////////////////
      mc_PI.btn_Ant1.useHandCursor = true;
      mc_PI.btn_Ant1.onRelease = function():Void
      {
          trace("mc_Ant1 clicked");
      }