Tutorial: Page (2) of 3 - 02/08/05 Email this story to a friend. email article Print this page (Article printing at MyDmn.com).print page facebook

Scripting a Dynamic 'Play All' Button in DVD Studio Pro 3

A universal method for adding 'play all' functionality to any project
Script 2: Play the 'next' track
For the second script, we need something that will tell the DVD player to jump to the next track when it's finished playing the current track. And, of course, we want to do this without referring to any specific track, just whichever one happens to be the next one down in your list of tracks in the Outline tab, as seen below. (I've labeled mine "First Track," "Second Track," etc., but the names don't matter.)



The way we do this is to add 128 to the current value stored in GPRM 4. Why? I don't know. But in DVD Studio Pro, subsequent tracks have a value 128 higher than the previous track. So, with Track 1 set to 49280, Track 2 will have a value of 49408 (49280+128). Track 3 will have a value of 49536 (49408+128). And on down the line, each next track having a value 128 higher than the previous.

Therefore all we need to do is add 128 to GPRM 4 in order to get the value of the next track, whichever track that might happen to be. To do this, add another script to your project, and call it "Play Next." Then add the following commands tot he script.


1. Set GPRM. This time, use the Operation "add." Set the Source Type to Immediate; set the Value to 128; and set the Target to GPRM 4. This will just add 128 to whatever value is currently stored in GPRM 4. This value, of course, will keep getting higher as each track is played, so that the script will be able to determine which track should come next no matter how many tracks are in your project.



2. Jump Indirect. This, again, will use the value in GPRM 4 to jump to a track whose value is equal to this figure. If, when the script runs, the value in GPRM 4 is 49408, then it will play Track 2. If it's 49536, it will play Track 3. You get the idea. However, in this case, we also want to use a Compare Command function so that it only looks for a "next track" if the user is watching your DVD in "Play All" mode. I'll explain this a bit more later. But for now, set the Compare Command function as seen below: Execute if GPRM 4 != (is not equal) to Immediate with value 128.



3. And, finally, we need to add one more command, which is a regular jump back to our main menu in case the user is attempting to view just this one track, rather than a whole sequence of tracks. Again, I'll explain how this works when we put this all together later on. So, for now, just add a third command (Jump), with a "Jump To" value of "Menu 1" (or whichever menu is your main menu).



And that's it for Script 2. If you can believe it, that was the most difficult one of the bunch.


Page: Prev Page 1 2 3 Next Page


Related Keywords:apple dvd studio pro, scripting, authoring, play all button, dynamic scripts

HOT THREADS on DMN Forums

Our Privacy Policy --- @ Copyright, 2015 Digital Media Online, All Rights Reserved