|Page (1) of 3 - 02/08/05||email article||print page|
Scripting a Dynamic 'Play All' Button in DVD Studio Pro 3A universal method for adding 'play all' functionality to any project
And, what's even better, these three scripts can be saved and used in any project, regardless of the number of tracks in your project, the number of menus, the number of chapters in any given track or anything else that might be going on in your project. In short, what I've attempted to do was to come up with a universal, reusable set of scripts to handle play-all functionality for any situation and with minimal effort.
The difference between this and, say, the method outlined in DVD Studio Pro is that we're going to create dynamic scripts that do not refer to any specific track by name, but rather by the GPRM values DVD Studio Pro assigns to tracks in a project based on their order. These values remain constant for any project in DVD Studio Pro--at least the several that I used when testing these scripts--and the values carry over to the final disc, so that there shouldn't be problems using this method in any standard DVD player. I should qualify that by saying that I've tested this method in a number of DVD players with a number of different projects, and they all seem to work. But I can't test every DVD player out there. So please, as usual, make sure to test your completed disc before sending it out to clients.
Excited? If you're not, then you've never tried to script a "Play All" feature into your DVD, which involves creating an individual script for every track in your project. Let's get started. We'll begin with the creation and brief explanation of our three scripts, then put it all together in our project. (Incidentally, you'll be able to download my sample scripts on the last page.)
Script 1: Play first track
First we need a script that will play the first track and set a base value in our GPRM. We'll be using GPRM 4 throughout this project exclusively, but, if you're already using GPRM 4 for something else, any ol' GPRM will work fine.
1. To begin, create a new script (Project > Add to Project > Script). Change the default Nop command to Set GPRM. Set the Operation to mov; set the Source Type to Immediate; set the source value to 49280; and set the target to GPRM 4 (or whatever GPRM you'd care to use).
The reason for this is that DVD Studio Pro assigns a value of 49280 to the first track in your project--the first track being the topmost listed in the Outline tab in your project. So 49280 refers to your first track.
2. Next we need to do something with this. Since this script will be used to play the first track in our project, we'll add a command to get us there. But instead of using a standard Jump, we'll use Jump Indirect, with to "Set To" parameter set to GPRM 4, as seen below.
The effect of this then is that the script will jump to whatever track in your project has a value equal to whatever is stored in GPRM 4 (currently 49280), which means it will jump to your first track.
And that's it for our first script.
Related Keywords:apple dvd studio pro, scripting, authoring, play all button, dynamic scripts
Source:Digital Media Online. All Rights Reserved