Home TI-Nspire Authoring Playing with the Player ← Advanced Player Techniques

Mathematics and Science Player Sampler


Playing with the Player: Advanced

Mathematics and Science Player Sampler


If you use the Export method described previously, then you can sneak a peak at the HTML/Javascript code in the resulting file. This reveals the following code, used to display my String_Art_Explorer.tns document in the Player:


To set up your own pages, just copy and paste this code into your HTML page and replace the nspirefile name with that of your document. The rest takes care of itself! Your TI-Nspire document will appear embedded in the HTML page, in a 640 x 480 window.


Linking to a button or image

Using a button or image as the source for opening a floating Player window is a very effective method, especially if you have multiple Player documents linked from a single page. Because the Player takes a few seconds to load each time it runs, having more than one such embedded window will cause your page to take quite a long time to load. by using images or buttons, this may be avoided, and the user can simply choose the particular document they desire.

This method actually uses a little JavaScript code which tells the page what to do with the button or image. This is the method used in the Mathematics and Science Sampler pages.

Begin by inserting the code shown in the section or just at the start of your HTML page. (You can view the Source of this page in your browser and copy and paste the code from there - both the images below are linked to the Player!).


This defines a function called open.window which is used in the Player code, as follows:


This code links a button called "launch_player.JPG" to the code included in the onClick command. When the user clicks the button, it opens a window (using the open.window script above) which displays the Player!

Copy and paste these into your own documents and change the names to your own TI-Nspire documents to begin playing with the Player!


©2010 Compass Learning TechnologiesHome TI-Nspire Authoring Playing with the Player ← Advanced Player Techniques