cta under video
Create engaging e-learning courses
Now enough theory. let’s start with our first example.
So I click on publish
And under ‘Publish’ I select a single slide and click on ‘OK’ and now we can click ‘Publish’.
Click ‘View Project’ to view the slide in a browser. I see that my browser launches an alert box with the text ‘I am an alert box’.
In my first example there was a standard text on my alert box. But I want that the user can fill in their own custom text that is displayed in the alert box.
In my example course I add a blank slides by going to the Slides tab and under new slide I choose a blank slide.
The second step is to add a text entry field on the slide. Click the insert tab. Go to input and under data entry click text entry field.
When you add a text entry field on your slide Storyline automatically generates a variable. In this case the variables name is TextEntry. With a Capital T and a Capital E.
Now let’s add a button that triggers the alert box.
I’ll add a button trough the Insert Tab, button and I draw it on my screen. In the button I type alert box.
The next step is to add a trigger that launches the alert box.
Now let’s add the code to display the storyline variable TextEntry in the Alert box.
I’ll copy paste it in the trigger field and explain line by line what the code means and does.
With the first line of code var player = GetPlayer(); you request all variables from Storyline.
Now let’s preview the course and see If everything works. I click on publish choose web and under publish I select single slide. 1.2 untitled slide and I click ok and publish.
Now click on view project to view the published slide in a browser. I Fill in some text in the text entry field.
Hello world i’m Mark
And I click on the TextEntry button. You see my browser shows a alertbox with the contents of the Text Entry field.
Maybe your asking yourself how can I use this in a course? It is especially useful if you have a course with a lot of variables that doesn’t work as expected. You can use the alert boxes to debug your Storyline project.