You can use scripting in Adobe Captivate to do the following:
Enhance the interactivity of Adobe Captivate projects by handling complex, and condition-based interaction scenarios.
Control the movie.
The scripting for the advanced actions model in Adobe Captivate is based on the Object-Event-Action model.
Events on an interactive object, such as mouse-clicks, trigger actions that are defined for that event. You can handle complex interaction scenarios by scripting your own actions and applying them to the various interactive objects. The scripting editor in Adobe Captivate helps you script custom actions for interactive objects.
You can use the following options to define actions for interactive objects in Adobe Captivate:
Provide if … else conditions with 'and', or 'or' operators when scripting actions.
Use a single script to run multiple actions in a sequence. Although the user interface provides a way to run multiple actions, it is restricted to the actions available in Adobe Captivate. During scripting, it is possible for you to combine actions defined during scripting with predefined actions in Adobe Captivate.
When editing a script, use the appropriate icons to add, remove, copy, cut, paste, insert, or move a statement (a line of code).
Use the drop-down list to change the type from Variable to Literal, or the other way round.
To remove a decision, select the decision and then click the delete icon.
- To add a decision tab, click +.
- To delete a decision tab, click the tab, and then click '-'.
- To duplicate a decision tab, click the Duplicate Decision tab.
- To reorder the decision tabs, use the Move Left and Move Right icons.
- To duplicate the entire conditional action (all decision tabs), click the Duplicate Action icon at the top right corner of the Advanced Actions dialog box.
- To preview the conditional action, click the Preview icon at the top right corner of the Advanced Actions dialog box.
You can copy an Advanced Action into another project by copying the objects or slides associated with the Advanced Action and pasting them in the target project.
In a project, Advanced Actions can be called from various objects or triggered by many events. The following table summarizes the different scenarios and indicates whether the associated Advanced Actions can be copied:
|Advanced Actions associated with...||Can be copied?|
|Project Preferences (Quiz Pass/Fail)||No|
While copying a slide or an object associated with an advanced action, ensure that you copy all objects or slides that are referenced within the Advanced Action. For example, consider that an Advanced Action "MyAction" is associated with a button. The action contains a 'Show' action that displays an image 'Flower', and a 'Hide' action that hides an image 'Mango'. Now, if you need 'MyAction' in another project, copy the slide containing the button, and the slides containing the images 'Flower' and 'Mango'. Then, paste them into the project.
|If Advanced Action includes this action...||...then...|
|Play Audio||The audio file is copied into the target project|
|Variables||The variables are copied into the target project. If a variable configured in the Advanced Action does not exist in the target project, the variable is automatically created. If a variable exists with the same name, a new variable with the same name suffixed with a number is created.|
|Jump to Slide||The Advanced Action is successfully copied only if the target slide is already copied into the target project.|