Plain ZIM.
Here is the code:
// given F (Frame), S (Stage), W (width), H (height)
// put code here
let score1 = 0;
let score2 = 0;
let score3 = 0;
let score4 = 0;
var intro = makeIntro(stage);
var pv1a = makePv1a(stage);
var pv1b = makePv1b(stage);
var pv1c = makePv1c(stage);
var pv1d = makePv1d(stage);
var pv1e = makePv1e(stage);
var pv2a = makePv2a(stage);
var pv2b = makePv2b(stage);
var pv2c = makePv2c(stage);
var pv2d = makePv2d(stage);
var pv2e = makePv2e(stage);
var ftn1a = makeFtn1a(stage);
var ftn1b = makeFtn1b(stage);
var ftn1c = makeFtn1c(stage);
var ftn1d = makeFtn1d(stage);
var ftn1e = makeFtn1e(stage);
var ftn2a = makeFtn2a(stage);
var ftn2b = makeFtn2b(stage);
var ftn2c = makeFtn2c(stage);
var ftn2d = makeFtn2d(stage);
var ftn2e = makeFtn2e(stage);
var ftn3a = makeFtn3a(stage);
var ftn3b = makeFtn3b(stage);
var ftn3c = makeFtn3c(stage);
var ftn3d = makeFtn3d(stage);
var ftn3e = makeFtn3e(stage);
const transs = ["reveal", "slide", "fade", "fan", "pixelDark", "pixelLight", "pixelZIM",
"bubbleDark", "bubbleLight", "bubbleZIM", "lineDark", "lineLight", "lineZIM",
"explodeDark", "explodeLight", "explodeZIM"];
shuffle(transs);
rightsnd = new Aud("right.mp3");
wrongsnd = new Aud("wrong.mp3");
var pages = new Pages([{page: intro, swipe: []}, pv1a, pv1b, pv1c, pv1d, pv1e, pv2a, pv2b, pv2c, pv2d, pv2e,
ftn1a, ftn1b, ftn1c, ftn1d, ftn1e, ftn2a, ftn2b, ftn2c, ftn2d, ftn2e, ftn3a, ftn3b, ftn3c, ftn3d, ftn3e
], transs[rand(0, transs.length - 1)], .7
).addTo();
pages.disable();
intro.name = "intro";
pv1a.name = "pv1a";
pv1b.name = "pv1b";
pv1c.name = "pv1c";
pv1d.name = "pv1d";
pv1e.name = "pv1e";
pv2a.name = "pv2a";
pv2b.name = "pv2b";
pv2c.name = "pv2c";
pv2d.name = "pv2d";
pv2e.name = "pv2e";
ftn1a.name = "ftn1a";
ftn1b.name = "ftn1b";
ftn1c.name = "ftn1c";
ftn1d.name = "ftn1d";
ftn1e.name = "ftn1e";
ftn2a.name = "ftn2a";
ftn2b.name = "ftn2b";
ftn2c.name = "ftn2c";
ftn2d.name = "ftn2d";
ftn2e.name = "ftn2e";
ftn3a.name = "ftn3a";
ftn3b.name = "ftn3b";
ftn3c.name = "ftn3c";
ftn3d.name = "ftn3d";
ftn3e.name = "ftn3e";
const paagnms = [pv1a, pv1b, pv1c, pv1d, pv1e, pv2a, pv2b, pv2c, pv2d, pv2e,
ftn1a, ftn1b, ftn1c, ftn1d, ftn1e, ftn2a, ftn2b, ftn2c, ftn2d, ftn2e, ftn3a, ftn3b, ftn3c, ftn3d, ftn3e];
loop(paagnms.length, i => {
paagnms[i].go.on("mousedown", function() {
pages.go(intro, "left");
if (paagnms[i].correct == true) {
if (n == 0) {
score1 = paagnms[i].points + score1;
intro.p1score.label.text = score1;
} else if (n == 1) {
score2 = paagnms[i].points + score2;
intro.p2score.label.text = score2;
} else if (n == 2) {
score3 = paagnms[i].points + score3;
intro.p3score.label.text = score3;
} else if (n == 3) {
score4 = paagnms[i].points + score4;
intro.p4score.label.text = score4;
}
}
nextplayer();
S.update();
});
});
pages.on("pagetransitioned", function() {
shuffle(transs);
pages.disable();
S.update();
});
pages.on("page", () => {
pages.disable();
S.update();
});
pages.on("swipe", () => {
pages.disable();
});
You can see I even added the empty swipe array to the first page, as I understood from the docs, to "disable" the swipe.
Also, you can see the functions tied to each page that launch the separate js files. How can I launch the js file every time the page is "active"? Right now, they only launch one, when I go back to the page it's as it was when I left it. I doesn't relaunch the js file.
Thanks,