To create pools of messages, we will use two JavaScript arrays. To make a long story short, a JavaScript array is a variable that has the ability to contain multiple pieces of data. Each piece of data in a JavaScript array is stored at a specific and unique index within the array.
Use the following steps to create the necessary arrays:
- Return to the Chapter14/takeTheTrain.cptx file.
- Use the Filmstrip to go to the first slide of the project.
- Make sure that the slide is selected and open the Properties inspector.
- In the Actions tab of the Properties inspector, open the On Enter drop-down menu.
- Select Execute JavaScript in the list of actions.
- Click the Script Window button.
This action opens an empty JavaScript window. It is in this window that you can write the JavaScript code that you want Captivate to execute when entering the first slide of the project. In this example, the JavaScript code has already been written for you, so you will simply...