Want to make a random loader but

Hi everyone,
I need help with something:
I’m doing a button that have a javascript code that make that button to load a random scene,

this is the code i’m using

var links = [“scene1”,“scene2”,“scene3”];

function untitledFunction() {
  // Chooses a random link:
  var i = Math.floor(Math.random() * links.length);
  // Directs the browser to the chosen target:
  hypeDocument.showSceneNamed(links[i], hypeDocument.kSceneTransitionCrossfade, 1.1);
  return false;


but, if i want to make that stop repeating the previous loaded scenes?.

please help me!!

thank you so much.

best day :slight_smile:

1 Like