This method opens a given box file as a modal window and waits until the window is
closed before returning. After the scene is closed, the user could look at keys in
the dictionary to get return values. The dictionary can also use the following
built-in keys:
- noActivate - This key can be set to true to open the scene and does
not activate the window.
- isChildWindow - This key can be set to true to open the scene as a
true child window of its parent.
- useTheme- This key has a value with the format 'ALIASNAME=BOXURL'.
This key sets the theme for this scene. See the scene class method
scene::setThemeForAlias for more information.
function onLaunchSample()
{
var params = null;
try
{
params = shell.serviceManager.basics.dictionary;
// Add items to dictionary for the new scene to access.
}
catch (e)
{
params = null;
}
if (params)
{
var boxFile = "../content/sample.box";
shell.openSceneAndWait(boxFile, scene, "Sample", params);
// Could get values out of the dictionary that the scene had set.
// This is how you would get return values.
}
}