Author Topic: showing page numbers when the pageoffset is used  (Read 1484 times)

Alia17

  • Newbie
  • *
  • Posts: 12
showing page numbers when the pageoffset is used
« on: August 23, 2009, 12:10:55 PM »
I used the pageoffset to synchronize my pages with the page numbers in the book and found that the book cover then gets the number -, then goes -1, 0 and then the first page. The order is good, but it's not very nice to show -1 and 0 number of the pages. I think it would be better not to show these numbers at all, but unfortunately I can switch off the pages in  the whole book, but not on two exact pages.
« Last Edit: August 23, 2009, 12:12:34 PM by Alia17 »

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1342
  • MegaZine3 Developer
    • MegaZine3
Re: showing page numbers when the pageoffset is used
« Reply #1 on: August 25, 2009, 12:53:59 PM »
That's actually unintentional... in the next version negative numbers and zero will be displayed as "-".
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

xangola

  • Newbie
  • *
  • Posts: 1
Re: showing page numbers when the pageoffset is used
« Reply #2 on: October 21, 2009, 04:46:32 PM »
On the Methods area of pagenumber.as on gui folder, just change it like this:

 // ---------------------------------------------------------------------- //
    // Methods
    // ---------------------------------------------------------------------- //
   
    /**
     * Sets the number for this page number display.
     *
     * @param number
     *          the number to display.
     */
    internal function setNumber(number:uint):void {
        if ((number + settings.pageOffset) < 1 || number > megazine.pageCount) {
            numberTextField.text = "-";
        } else {
            numberTextField.text = String(number + settings.pageOffset);
        }
    }
i wanted just not to shownumbers if pagenumber is zero or negative.

After changes just compile ur megazine.fla and put megazine.swf on the proper place.

obs.- this for ver 1.38 for older versions just use _pageOffset instead of settings.pageOffset
« Last Edit: October 21, 2009, 05:10:17 PM by xangola »