0 Replies Latest reply on Mar 22, 2011 6:17 AM by bkrascal

    Flipping Book Component zoom in page question

    bkrascal

      Hello,

       

      I have a flipping book component that works well. It has also a zoom button and function that also works but too well. It zooms too much.

      I would like to have it zoom in less, but I cant find out how to adjust the zoom percent.

       

      Can anyone help with this? Here is the "START ZOOM Function" code...

       

       

       

       

      // Zooming settings

      zooming = false;

      zoom_panel_mc.zoom_btn.onPress = startZoomingMode;

      myBook.onClick = bookClick;

      function startZoomingMode() {

      myBook.flipOnClickProp = false;

      myBook.autoFlipProp = 0;

      showZoomPointer();

      zooming = true;

      }

      function bookClick(pageNumber, page_mc, isCornerClick) {

      if (!zooming) {

      return;

      }

      var page_url = page_mc.URL;

      if (page_url != undefined) {

      open_popup(page_url, pageNumber);

      } else {

      zooming = false;

      myBook.flipOnClickProp = true;

      myBook.autoFlipProp = 50;

      hideZoomPointer();

      }

      }

      function open_popup(page_url, pageNumber) {

      if (zoom_win != undefined) {

      return;

      }

      hideZoomPointer();

      zoom_win = mx.managers.PopUpManager.createPopUp(_root, Window, true, {title:"Page Number: " + pageNumber, closeButton:true});

      zoom_win.createObject("ScrollPane", "zoom_pane", 0, {contentPath:page_url, _x:3, _y:31});

      zoom_win.setSize(popup_width, popup_height);

      zoom_win.zoom_pane.setSize(popup_width-6, popup_height-31);

      listenerObject = new Object();

      listenerObject.click = closeWindow;

      zoom_win.addEventListener("click", listenerObject);

      zoom_win._x = Stage.width/2-popup_width/2;

      zoom_win._y = Stage.height/2-popup_height/2;

      }

      function closeWindow(eventObject:Object) {

      zoom_win.deletePopUp();

      zooming = false;

      delete zoom_win;

      myBook.flipOnClickProp = true;

      myBook.autoFlipProp = 50;

      }

      function showZoomPointer() {

      Mouse.hide();

      attachMovie("ZoomIcon", "zoom_icon_mc", 0);

      zoom_icon_mc.onEnterFrame = function() {

      this._x = _xmouse;

      this._y = _ymouse;

      };

      }

      function hideZoomPointer() {

      Mouse.show();

      delete zoom_icon_mc.onEnterFrame;

      zoom_icon_mc.removeMovieClip();

      }