|Page (1) of 4 - 10/19/04||email article||print page|
DVD Studio Pro Scripting, Part 3Adding a timer to an interactive quiz
The basic setup
We're not going to get too complex with this project. Essentially we'll create a timer function to check the time when a button is activated to determine whether the quiz should continue or jump to an "out of time" graphic. We'll also build a prescript to check the countdown periodically (in case there's a lack of action on the part of the user). What we will not be doing is creating a countdown display; if there's a way to do this without interfering with the functionality of the quiz, I don't know about it.
For this example, we're going to use the same scripts that we created in last week's tutorial and modify them to include the timer functionality. Therefore, if you have not already done so, it would behoove you to go back and read that previous tutorial, which you can find here. As for preparation, once again, our quiz is based on eight menu elements (a start screen, five question screens, a success screen and a failure screen). And we'll have four scripts total for keeping score and checking the time. (That's one more than last week; the additional script, seen below, will be for periodically checking the time. We'll get into that in the last section in this article.)
The basic menu setup is exactly the same as last week's, so we don't need to go into any detail on that. (I just wanted to show you the structure again so that you'd see which menus the scripts refer to.) Instead we'll concentrate on the timer functionality and how to incorporate it into your existing scripts.
Before we get started, if you wish, you can download the four scripts I'm using for this example by clicking here.
Related Keywords:apple dvd studio pro, scripting, timer, quiz, score
Source:Digital Media Online. All Rights Reserved