3 Replies Latest reply on Jun 2, 2009 3:53 AM by jeremiahtrue

    Problems with button inside draggable movie clip

    jeremiahtrue Level 1

      I am building a click through presentation that has some small text in it. To maintain the design and allow for readability, I have added a zoom feature.

       

      Here is the structure of the movie,

      Stage - contains pages movie clip and forward/reverse click buttons for changing pages

           pages_mc - contains 24 frames, one page per frame and buttons

       

      There is a button at the _root level that uses a tweener to scale the pages_mc up to 170%. When this is clicked, it allows the pages to be dragged around the screen so you can look at different sections. When you click the button again, it returns the pages back to their original size stops drag.

       

      My problem is, on the pages, there are buttons with links to external sites. Once startDrag has been invoked, I cannot touch the buttons inside the movie clip. Is there a way to make these buttons work?

       

      I need the finished quickly so any assistance is welcome.

       

      Code below

      magUp_btn.onRelease = function() {
      this._visible = false;
      TweenLite.to(pages_mc, .25, {_x:-250, _y:-193, _xscale:170, _yscale:170});
      TweenLite.to(magUp_mc, .75, {_alpha:0});
      TweenLite.to(magDown_mc, .75, {_alpha:25});
      magDown_btn._visible = true;
      pages_mc.onPress = function(){
      this.startDrag();
      }
      pages_mc.onRelease = function(){
      this.stopDrag();
      }
      pages_mc.onReleaseOutside = function(){
      this.stopDrag();
      }
      pages_mc.useHandCursor = false;
      TweenLite.to(instr_mc, 1, {_alpha:100});
      }

      magDown_btn.onRelease = function() {
      TweenLite.to(pages_mc, .25, {_x:0, _y:0, _xscale:100, _yscale:100});
      TweenLite.to(magUp_mc, .75, {_alpha:25});
      TweenLite.to(magDown_mc, .75, {_alpha:0});
      this._visible = false;
      magUp_btn._visible = true;
      pages_mc.onPress = function(){
      this.stopDrag();
      }
      TweenLite.to(instr_mc, 1, {_alpha:0});
      }

       

      I don't know how to turn drag off when I zoom out without using the onPress command, but I know that this is probably what is getting in the way of the button working?

       

      Thanks!