Randomized pages

  1. 5 months ago

    Am I able to make a children's book where the pages are chosen at random every time you go to the next page?

  2. Angelo S

    Jun 28 Administrator

    hello noel, you have to turn off the default navigation with arrows or swipe (basing on the output format you are using) and use a Run JavaScript action in a button to let the user change page, with simple code like this:

    const pagesCount = Object.keys(pubcoder.pages).length;
    const randomDestPage = Math.round(Math.random() * pagesCount);

or Sign Up to reply!