|Page (4) of 5 - 05/17/04||email article||print page|
DVD Studio Pro ScriptingProject 1: Creating a 'last viewed' button Scripting the 'View Previous' button
Now you need to create one more script (Script 4). This is the script that we'll assign to our "View Previous" button. It has two functions. First, it determines which track was the last-played track; then it jumps to that track. And it does it all using the values supplied by our previous three scripts. Not too tricky.
So create your new script (Script 4), and select the default command in the Script tab so that you can modify it in the Inspector palette, just like you did previously. This time, however, we're going to set the Command to "Jump."
Then we're going to tell it to Jump To "Track 1" (or whatever your first track happens to be called).
And then we're going to check the "Compare Command" option. What this allows us to do is to say, essentially, jump to Track 1 "only if" the current GPRM 0 value is 1. In other words, it will jump to Track 1 only if Track 1 was the last played track because Track 1's Pre-Script, you'll recall, sets GPRM 0 to an immediate value of 1 when it plays.
Related Keywords:apple dvd studio pro, dvdsp, scripting, button
Source:Digital Media Online. All Rights Reserved