BRIGHAM YOUNG UNIVERSITY
BYU LiveCode Lessons Gateway
Office of Digital Humanities
Using QuickTime Movies in LiveCode
Due: On the date indicated on the schedule.
This project will help you learn
how to incorporate and control QuickTime movies into your LiveCode stack. For
project you will use the Romeo and Juliet short QuickTime movie
in the QT Project folder inthe Templates folder.
- Go to the Templates folder on the CHum 310 file server and download the folder called "QTProject".
- Make sure your copy of the template stack is unlocked (i.e., not read only). You can do this by doing File > Save As... after downloading the stack, or by downloading over the internet with
go stack URL "http://chum310.byu.edu/Templates/QTProject/QTProjTemplate.rev" in the message box and saving the stack locally with File > Save.
- Rename the stackfile to include your name.
- In the folder you should find, in addition to the template stack, a video called Denouement.mov and a text file called denouement.txt. The text file contains the spoken dialog from the video file. Each line of dialog ends with a return (carriage return) character, so that LiveCode sees it as
a single line.
- You will need to script your stack to provide the following functionality. You do not have to use the exact buttons provided. You may combine or divide functionality using whatever buttons you wish:
Finishing touches: Remember that a clear and visually appealing interface is important for making your stack user friendly. Consider ways to improve the current design. For example, you could use the imported images at the bottom of the card as icons for the movie controller buttons. (Be sure to hide them when you're done.) Consider also such things as screen layout and size and appearance of text, buttons, etc. Proofread your materials carefully.
- When you open the card, the movie"Denouement.mov" should be automatically be linked to the player object "myMovie" (or whatever you want to name it.) Make sure that this link is not broken if you move your project folder to another locationor system. (Hint: You may want to use the defaultFolder property to handlethis. Or you could leave the file on our class server and refer to it using an http:// URL.
- When you open the card you should automatically load contents of the file
"denouement.txt" into the field provided.
- The movie's controller should not be visible. Instead you will script the buttons to provide control of the video player.
- When you click on a line of dialog in the dialog field, the video segment
corresponding to that line should play. (See hint* below for a idea on how you could do this.)
*Hint: You could create a custom property for the field "dialog". Call it something like "dialogIndex". On each line of this custom property you could put the startTime and endTime, separated by commas, for the segment of video in which that line of dialog is spoken.
When you click on any of the control buttons they should turn off the play segment setting. Additionally, each button should behave as follows:
- Rewind: Reverse the direction of video playback, at twice the normal speed.
- Play/Pause: If playing, video should pause. If paused, bideo should resume playing from the current frame, at normal forward speed. The button's label and/or icon should reflect what will happen when you click it.
- Stop: Video should stop playing and be reset to the beginning. Be sure to update the label and/or icon of the Play/Pause button.
- Fast Forward: Video should play forward at twice the normal speed from the current frame.
- Create automatic commentaries that automatically appear in the commentary field as the movieis playing. For example, you may want to display a comment like "John is about to walk through the door." at an appropriate time during the playback. Remember to delete the commentary when it is no longer relevant. You should provide at least three (3) separate commentaries. Use callback messages to do the commentary.
The stack "QTProjKey.rev" in the Keys folder shows a working example. Please don't simply copy the scripts from that stack, but do refer to it if you get stuck.
BYU LiveCode Lessons Gateway
Maintained by Devin Asay
Copyright © 2005 Brigham Young University