1 Reply Latest reply on Sep 23, 2009 7:12 AM by Gu55tav

    Actionscript 2 zoom help

    Gu55tav

      Hi,

       

      Im using the updated page flip code (link below) and have a bit of a problem.

       

      When i zoom into the page then move around the edge of the page can be moved past the edge of the browser window showing the static page which appears at the start of the document. Is it possible to use actionscript to stop the page being dragged past a certain point so the static page is not seen? On the example below the static page is white so it does not pose too much of a problem however im using the static page as a sort of instruction page and it looks a bit rubbish if the user drags a page past the edge of the view window and see's the original page.

       

      Example below.

       

      http://hobbscene.com/skins/hobbscene/pageflip/pageflip_dynamic_v2.html

       

      If someone can help I would be most grateful.

       

      Guss

        • 1. Re: Actionscript 2 zoom help
          Gu55tav Level 1

          Here is the code i am using for the zoom and drag function. If anyone could help me set the parameters to stop the page being dragged past the edges of my screen that would be great.

          pages.onMouseDown = function () {
          // check if page is zoomed
          if (pages._xscale != 100) {
          Dragging = true;
          updateCursor();
          Mouse.hide();
          dragCursor._visible=true;
          startDrag(this,false);
          }
          };

          pages.onMouseMove = function () {
          updateCursor();
          if(Zooming) {
          // constrain movement of the zoom slider
          ZoomSlider._y=SliderY;
          }
          };

          pages.onMouseUp = function () {
          stopDrag ();
          Mouse.show();
          Dragging = false;
          dragCursor._visible=false;
          if (pages._xscale==100) {
          pages._x=pagesx;
          pages._y=pagesy;
          }
          };

          function updateCursor() {
          dragCursor._x = _root._xmouse;
          dragCursor._y = _root._ymouse;
          }