Home TI-Nspire Authoring Lua Scripting HQ Lua and JavaScript Scripting Tutorial - Lesson 13

Lua and JavaScript

Scripting Tutorial - Lesson 13: Classes and Keyboard Controls

  

Play with the script in the text box below, and then click the "run your code" button above.

Click "run your code!" to get started.

You can copy and paste the script (or type your own) into the lower text box and then click "run your code!" After that, explore and experiment!


  

Look at how this script has been adapted for the browser context. Since we have no tab or escape key controls, then there is no way to define a "TrackedObject" using the keyboard - we can only use the arrow keys to move the object. Look closely at how this movement has been limited to prevent the square from moving off the visible window.


Home TI-Nspire Authoring Lua Scripting HQ Lua and JavaScript Scripting Tutorial - Lesson 13