Other Content

Table Of Contents
Create a Script to Call Up an Image
1. Type a script in the script line box as follows:
myimage = image.new(_R.IMG.img_1)
function on.paint (gc)
gc:drawImage (myimage, 30, 30)
end
Note:Replace img_1 (above) with the name of your image.
2. Click Set Script to save the script. You will see your image in the Document
Preview screen.
3. Click Focus Script to set the focus to the page in the document where you
want to attach the script application.
Note: A TI-Nspire document sets the focus to the page; A PublishView™
document sets the focus to the frame on the page.
Create a Script to Call Up Multiple Images
1. Type a script in the script line box as follows:
myimg = {}
for name, data in pairs (_R.IMG)
myimg [name] = image.new(data)
end
function on.paint (gc)
gc:drawImage (myimg[imagename], 30, 30)
end
2. Click Set Script to save the script. You will see your image in the Document
Preview screen.
3. Click Focus Script to set the focus to the page in the document where you
want to attach the script application.
Note: A TI-Nspire document sets the focus to the page; A PublishView™
document sets the focus to the frame on the page.
Writing Lua Scripts 529