Project 2: Electronic Book Take the initial project, add in a stream of video with buttons and scroll bars to control it. PART 1 ****** 1. Add video to the data file: a. include your test.dat file (ctrl-x i); b. add a video window to the screen set -- change the size of the parent window to 700x700. Make the video window 640x480. This should look something like: (vidwindow, video, waldo, 10, 10, 640, 480, 1, 1, 0) c. At the bottom of the file add a new dataset: o include /mit/visual/amuse/forms/dataset.frm; o make the type `video'; o fill in the screen name of the video window you just made. d. Add a data mapping to the dataset: o include /mit/visual/amuse/forms/videomap.frm; o fill in some frame numbers 2. Test the results so far. Save the file as `book.dat'. Note: You will not be able to save the file in the /mit/visual space. Save it as: /mit//book.dat 3. Run the Muse program on your file with the following command: /mit/visual/amuse/muse /mit//book.dat You should see a video window on the screen when this program runs, but it won't do anything because nothing is telling it to do anything. Part 2 adds a button to make it step along a page at a time. PART 2 ****** 4. Put the cursor below the data mapping for the Quit button and then include /mit/visual/amuse/forms/buttonmap.frm 5. Change the label and change the x and/or y position of the button; 6. Change the function of the button to rset_position(,1) Replace with whatever name you gave this package; for example, if the package were named `test' the function would like: function: rset_position(test,1) Note: rset_position needs a package name followed by one or more numbers separated by commas. The package name tells which package is going to be affected. The numbers tell what change to apply to each dimension in the package. The value of the number itself tells how much; this number can be positive or negative. The numbers are applied to the dimensions one after another in the order that the dimensions are created in the package. In this example, the number 1 will be interpreted as a 1 unit step on the first (and only) dimension in the package. 7. Add a second button that makes the video step backwards. It's the same as the first, but the function line looks like: function: rset_position(test,-1) 8. Test the results as in step 3. PART 3 ****** 9. Move the cursor to the bottom of the file and then include /mit/visual/amuse/forms/tkscrollmap.frm 10. On the `represents' line, fill in the package name, the dimension name, and the word `position'. The line should look like this: represents: test, time, position, Note: the comma is needed at the end (I think). 11. Test again. See if the scroll bar works.