Linking |
Top Previous Next |
You can use two ways of linking to another object
There are various limitations posed by the DVD system when using direct VM linking commands. Which command you use depends on the type of link. For example if you link Menu to menu you use LinkPGCN, Linking Movie to Movie or VTS Menu to Movie you can use JumpVTS_TT, Linking Movie with VMG menu you use CallSS VMGM, linking VMG Menu to movie you use JumpTT and linking VMG menu to VTS menu you use JumpSS VTSM.
As in VM Commands you can simply type:
LinkPGCN 2
This will link (from Menu) to Menu PGC 2 (which is the first menu - if you don't know why, read the bottom page here)
In Global VM commands you can also type this:
LinkPGCN "Menu 1"
This will link (from Menu) to Menu 1. If such menu doesn't exist you will get error while building script. As described before, you cannot just use any link command, you have to use correct link command for the type of link.
linkto Command To make this easier, Global VM has a linkto command.
linkto "Menu 1" linkto "VMG Menu 2"
The linkto command will choose the correct VM command for you during Build. In first case of "Menu 1" it will choose LinkPGCN, in second case with "VMG Menu 1" it will choose JumpSS VMGM. (provided of course the block is for a VTS menu, for other objects the result command may be different)
IF condition You can't use linkto with a simple one line If condition:
if (GPRM1 ==1) linkto "Menu 1" <<< this will show error on Build
You need to make advanced if -then -endif condition
if (GPRM1 ==1) then linkto "Menu 1" endif
Note: Linking between VTS menus and Movies require that they are from the same VTS.
Special case VTS Movie to VTS Menu: There is a special case if you use linkto in a Movie PRE or POST block and the target is a VTS Menu that is not the Root (for example Menu 2 etc..). Because DVD doesn't allow explicit linking using VM Commands between Movie and Menus, this case will use Abstraction Layer for help to fill the link. The linkto will (only in this case) actually physically draw a connection between the two objects. The type of it depends on PRE (will use menu button link) or POST (will use end link) command.
You have to keep this in mind. By simply deleting the linkto command and Building script again will NOT remove these links (unlike in all other cases).
Best way to link Movie to different VTS Menus This special case mentioned above has always only one possible link. That means, you cannot make the Movie to link to two different menus simply by using condition and linkto command - it will not work, you have to add one more "distributor" object in the VTS Menu domain...
The simplest way is to use aCondition splitter object:
or if you need more than two different targets (menus) you can use Case List Object:
All you need to do is to set the comparison register (in the images above it is GPRM0) in the Movie PRE or POST blocks depending to which Menu you want to link to.
|