1 Reply Latest reply on Sep 13, 2007 7:30 AM by MR_SCRUFF

    Help with bought component

      Hi I've recently bought a component from page-flip.com
      With the source code that came you get a number of example demo files showing you all sorts of additional functionality that you can add into the basic functions.

      One of which was a zooming tool.
      I've copied the actionscript and the movie clips into my own project and it works to an extent, in that it changes the cursor to a magnifying glass icon and when I click on a page in the movie it launches a popup window and in that window is a copy of the page, however it doesn't actually magnify the page, as it does in the demo file???

      Admittedly my actionscript knowledge is a little weak but I can usually get by, so I've trawled through the demo files and checked movie naming and actionscript but cannot see where the problem lies?

      The actionscript is listed below, the only area that is confusing me is where 'zooming' variables are setup.
      Surely there should be an initial variable setup that allows you to stipulate the magnification amount?

      here is the actionscript:

      import mx.containers.Window;
      // Popup size
      popup_width = 527;
      popup_height = 400;
      // Zooming settings
      zooming = false;
      zoom_panel_mc.zoom_btn.onPress = startZoomingMode;
      myBook.onClick = bookClick;
      function startZoomingMode() {
      myBook.flipOnClickProp = false;
      myBook.autoFlipProp = 0;
      zooming = true;
      function bookClick(pageNumber, page_mc, isCornerClick) {
      if (!zooming) {
      var page_url = page_mc.URL;
      if (page_url != undefined) {
      open_popup(page_url, pageNumber);
      } else {
      zooming = false;
      myBook.flipOnClickProp = true;
      myBook.autoFlipProp = 50;
      function open_popup(page_url, pageNumber) {
      if (zoom_win != undefined) {
      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) {
      zooming = false;
      delete zoom_win;
      myBook.flipOnClickProp = true;
      myBook.autoFlipProp = 50;
      function showZoomPointer() {
      attachMovie("ZoomIcon", "zoom_icon_mc", 0);
      zoom_icon_mc.onEnterFrame = function() {
      this._x = _xmouse;
      this._y = _ymouse;
      function hideZoomPointer() {
      delete zoom_icon_mc.onEnterFrame;

      Can anyone shed any light on where this might be? I can't find any other actionscript in the demo files?