7 Replies Latest reply on Nov 2, 2007 6:40 AM by kglad

    New to Actionscript: need SharedObject help

    klikmaker2004
      Hi, I'm new to Actionscript.

      I am using a program called Page-Flip ( http://page-flip.com) to make an online catalog. Everything is working fine, but I am trying to modify it a little using Actionscript. I'm trying to use SharedObject to have the document remember what page of the catalog was last viewed.

      Here's a link to what I have:
      http://www.portcityracing.com/general/assets/swf/all-in-one/Actionscript.html

      Right now, Everything works as expected: the user can navigate to the desired page. When on that page, the user can click on a part number , and be taken from the .swf file to an HTML page showing the product.

      When the user goes back to the page-flip catalog, they are brought to the front of the catalog. I would like them to be able to come back to where they left off. If they were last on page 27, I'd like them to return to page 27 next time they go to the page-flip.

      Here's the custom code that I have added, but it seems to be doing nothing at all:
      /*Custom Code Custom Code Custom Code */
      var so = SharedObject = SharedObject.getLocal("FlippingBook");
      /*End of Custom Code*/


      /*Custom Code Custom Code Custom Code */
      myBook.onPutPage = function(){
      clearInterval(flipInterval);
      if( so.data.pageNumber != undefined ){
      flipInterval = setInterval( this, "flipGotoPage", 1000, so.data.pageNumber );
      }
      so.data.pageNumber = ( this.leftPageNumber == undefined ) ? this.rightPageNumber : this.leftPageNumber;
      };
      /*End of Custom Code*/

      What do I need to change to make this work?
      Thanks in advance