Author Topic: Looping slideshow  (Read 789 times)

matsarne

  • Newbie
  • *
  • Posts: 16
Looping slideshow
« on: May 12, 2009, 08:36:50 am »
I would like to create a magazine that loops. So that it automatically flips pages (which already works), but jumps to the first page agian after reaching the end of the magazine. Is that possible in an easy way?

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: Looping slideshow
« Reply #1 on: May 12, 2009, 10:16:46 am »
Easiest way I can think of is using JavaScript:
Code: (javascript)
  1. MegaZine.onPageChange = function(page) {
  2.    if (page == MegaZine.getPageCount()) {
  3.        setTimeout(function() {
  4.            MegaZine.firstPage(true);
  5.            MegaZine.slideStart();
  6.            MegaZine.firstPage(true); // might be necessary if slideStart instantly triggers first page turn
  7.        }, 1000); // change this to some delay you want
  8.    }
  9. }

Not tested, only an idea. Everything else would need changes to the engine code and recompiling.
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.