LESSON EIGHT: CREATING ANIMATION USING OPENSCRIPT
The next task will involve creating a simple animation using OpenScript.
1. Open the book you created in Lesson Seven. Go to the last page and create a new page by clicking on the New Page icon on the Tool Bar. Use the Empty page using the current background option.
2. Open the Media Catalog and change the Subcategory to Clipart-Misc. Scroll down until you find the Pencil object. Drag it to the upper-left part your page (apply as Bitmap on the Page).
3. Select this object and click the Extended Properties icon from the Tool Bar. Uncheck Autosize and return to your page and make this object smaller. Remember to hold down the CTRL key if you do not wish to distort the graphic as you resize it.
4. Click on the Clipart object to select it.
5. Click on Object Properties icon from the Tool Bar and make sure it is named Pencil. Note that this is a button.
6. Create a button and place it at the bottom-left side of your screen. Set the caption of this button to Play Animation. Select the button and click the Script Editor icon from the Tool Bar to obtain the Script Editor. Write the following script for this button:
to handle buttonClick
move button "pencil" to 2000,2000
move button "pencil" to 3000,3000
pause 2 seconds
move button "pencil" to 2000,2000
end
7. Go to Reader level and click on the button to test this script. You can use most any event to activate an animation such as this. One method would be to place this script into the Page Properties script. Just substitute the words to handle buttonClick with to handle enterPage. You can use the above procedures to move (animate) any object on your page.
8. Save this book as mod5_8.tbk ((using Quick save option) and exit ToolBook to conclude this lesson.