Here is a little example of a random play script I set up for DVD Studio Pro. This random script is unique in that I have set it up so that it will never generate the same random number consecutively. This is a great way to add an “Easter egg” to your DVD. I have the steps listed below but you should really download this project to see it in action.
- Import your assets (I am using 4 movie clips and one menu) If you wanted to use this as an “Easter egg” just set it as a time out action on a menu I built it as a button here for demonstration.
- Create the containers for each of your assets.
- Added a script called random play and link your button (or time out action) to this script
- Set first line of script to “set a gprm” ran and 4 since I have 4 movies (I am using GPRM 0)
- Next line you want to goto line 1 if GPRM 0 = GPRM 1
- Next you want to set GPRM 1 to equal GPRM 0 (These last 2 line are the check so that it will not generate the same random number consecutively)
- Now just write jumps to each movie if GPRM 0 = 1 for movie 1 or if GPRM 0 = 2 for movie 2 and so on.
- For the last line where I could write a jump to movie 4 if GPRM 0 = 4 I instead like to NOT add the condition and just jump to movie 4. My reasoning behind this is sort of a fail safe line of code no matter how bad the dvd player mess up my code I have still created a simple jump out of the script.