Home Tutorials/How to Links Blog Photos
After Effects
Coldfusion
Dreamweaver/CSS
DVD Studio Pro
Final Cut Pro
Flash
Photoshop
DVDSP Random Play Script  
  PDF   Flashpaper    Downloads for this project

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.

  1. 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.
  2. Create the containers for each of your assets.
  3. Added a script called random play and link your button (or time out action) to this script
  4. Set first line of script to “set a gprm” ran and 4 since I have 4 movies (I am using GPRM 0)
  5. Next line you want to goto line 1 if GPRM 0 = GPRM 1
  6. 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)
  7. 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.
  8. 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.
  9. DVD Studio Pro Screenshot

Please support this site by visiting sponsors. Sponsor form.

[damonledet.com] [tutorials/howto] [links] [damon blog] [photos]
© copyright 2008, Damon Ledet all rights reserved
contact me