Facebook
From test, 8 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 409
  1. var page =0;
  2.  
  3.  
  4. setText("lblStory","You are on a walk and you find a time travel device.");
  5. setText ("btnStart","Pick It Up");
  6.  
  7.  
  8. onEvent("btnStart", "click", function( ) {
  9.   setText("lblStory","You are trying to decide what you want to do with this device.");
  10.   setText("btnA","Travel Into The Future");
  11.   setText("btnB","Travel Into The Past");
  12.   showElement("btnA");
  13.   showElement("btnB");
  14.   hideElement("btnStart");
  15. });
  16.  
  17.  
  18.  
  19.  
  20. onEvent("btnA", "click", function( ) {
  21.  if  (page==0){ //Travel Into Future
  22.    page=1;
  23.     setText("lblStory","You travel into the future and are brought into a huge city, with skyscrapers everywhere, flying cars, robots, everything you could think of.");
  24.     setText("btnA","Talk to the locals");
  25.     setText("btnB","Start exploring the city");
  26.    } else if (page==2){ //(Past) Go towards cavemen
  27.    page=6;
  28.     setText("lblStory","You go towards the group of Cavemen and see them trying to fight off a dinosaur.");
  29.     setText("btnA","Help Them");
  30.     setText("btnB","Watch Them");
  31.   }else if (page==1){//(Future) Talk to locals
  32.     page=3;
  33.  setText("lblStory","You start talking to the locals and they can tell that you aren't from there. They start questioning where you came from.");
  34.     setText("btnA","Tell them you are traveling");
  35.     setText("btnB","Tell them the truth");
  36.   } else if (page==3) {
  37.     page = 5;
  38.      setText("lblStory", "They don't believe you, but you keep trying to convince them. A nearby police officer comes to see what all the commotion is about. Things elevate and he starts trying to arrest you.");
  39.      setText("btnA", "Try To Run");
  40.      setText("btnB", "Cooperate");
  41.   } else if (page==5) {
  42.     page = 7;
  43.     setText("lblStory", "You try to run but they catch you and they bring you to the local jail. You are held for a long time, when 2 men in black suits come inside and start questioning you on where you came from.");
  44.     setText("btnA", "Tell them about the device");
  45.     setText("btnB", "Tell them you're traveling");
  46.   } else if (__) {
  47.    
  48.   } else {
  49.    
  50.  }setText("lblPage","Page Number: "+page)
  51.  
  52. });
  53.  
  54.  
  55. onEvent("btnB", "click", function( ) {
  56.  if (page==0){//Travel Into The Past
  57.    page=2;
  58.    setText("lblStory","It brings you to the top of a valley. As you look down the valley, you see a group of cavemen fighting a dinosaur. What do you do?");
  59.    setText("btnA","Go help them");
  60.    setText("btnB","Go the opposite way");
  61.  } else if (page==2){//(Past) Go opposite way
  62.    page=4;
  63.    setText("lblStory","You start exploring when you hear a T-Rex roar near you. However, you see a nearby cave.");
  64.    setText("btnA","Run Away");
  65.    setText("btnB","Hide In The Cave");
  66.  } else if ((page == 6)) {
  67.    page = 8;
  68.    setText("lblStory", "You watch them as they defeat the dinosaur. After killing it, they start looking around and see you. What do you do?");
  69.    setText("btnA","Try to talk to them");
  70.    setText("btnB","Run Away");
  71.  } else if ((page == 3)) {
  72.    page = 5;
  73.    setText("lblStory", "They don't believe you, but you keep trying to convince them. A nearby police officer comes to see what all the commotion is about. Things elevate and he starts trying to arrest you.");
  74.    setText("btnA", "Try To Run");
  75.    setText("btnB", "Cooperate");
  76.  } else if ((page == 5)) {
  77.    page = 7;
  78.    setText("lblStory", "You cooperate and they bring you to the local jail. You are held for a long time, when 2 men in black suits come inside and start questioning you on where you came from.");
  79.    setText("btnA", "Tell them about the device");
  80.    setText("btnB", "Tell them you're traveling");
  81.  } else if (page == 7) {
  82.    page = 9;
  83.    setText("lblStory", "They start questioning you on where you're traveling from, and they don't believe your story. n n They imprison you for the rest of your life");
  84.     hideElement("btnB");
  85.     hideElement("btnA");
  86.     showElement("btnStart");
  87.     setText("btnStart", "Play Again");
  88.    
  89.  } else {
  90.    
  91.  }
  92.  
  93.  setText("lblPage","Page Number: "+page)
  94. });
  95.