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

Dynamic End Jumps in DVD Studio Pro

Targeting the 'next' button in a sequence of tracks
Command 3. Now, for the third command, we're going to take the value of the "currently" highlighted button. This is a bit of trickery because, since at this point the viewer is watching a track, there is no currently selected button. However, a certain value for the last selected button is stored in one of the System Parameter Register Memories, SPRM 8. Oddly, that value is a multiple of 1024, regardless of which menu the button was accessed from. What we're going to do with this value is store it in a separate GPRM, in this case GPRM 1.

To do this, we make our third command a Set GPRM command as well, this time using the default "mov" Operation. The Source Type will be "SPRM." The Source Value will be "SPRM 8." And the Target will be GPRM 1.

Command 4. But obviously the number 1024 (or 2048 or 3096 or whatever) isn't going to do us any good by itself. So we're going to divide this number by 1024 to give us a smaller, more meaningful number--such as 1, 2, 3, 4 etc. So set the Command to "Set GPRM" once again. Set the Operation to "div." Set the Source Type to Immediate," the Source Value to "1024" and the Target to "GPRM 1."

Command 5. And then, finally, we come to the command that makes this whole thing come together. We now add the value stored in GPRM 1 to the value stored in GPRM 0. Remember, we're trying to target the next button in order in our chapter index. The value is GPRM 0 is currently the value of Button 1. By adding GPRM 1 to this value, we'll increase the value of GPRM 0 to the numerical value of the next button. So the fifth command, then, will also be a "Set GPRM" command. The Operation will be "Add." The Source Type will be "GPRM." The Source Value will be "GPRM 1." And the Target will be "GPRM 0."

And that is it. Here's the complete script in its final form.

Now, I know this is a bit complex, so, if you'd like to compare your own work with my script, you can download the modified End Jump script by clicking on the link below.

Download: End Jump-Modified (4 KB)

Finally, to recap how to put it all together, set the script called "Menu Prescript" as the prescript for all of your menus. Then set the "End Jump-Modified" script as the end jump for all of the tracks, stories and chapter that you wish to behave in this way. (Again, you can see more detail on the final process of making connections in our previous and much simpler tutorial on this topic, which you can find by clicking here.)

If you have any further questions, be sure to visit me in DMN's DVD Studio Pro forum by clicking here.http://www.dmnforums.com/cgi-bin/displaywwugindex.fcgi?forum=astarte_dvd To read our previous tutorials on DVD Studio Pro, be sure to follow the links below.

DVD Studio Pro Scripting, Series 1
DVD Studio Pro Scripting, Series 2
Other scripting articles
General design and authoring topics

Page: Prev Page 1 2

Related Keywords:apple dvd studio pro, end jumps, highlight next button, select next button, scripting


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