- For starters, create a no-frills, simple three page slide story like I show here.
- Optional: Use Storyline's DESIGN tab to give it a background pattern if you like.
- Save the Storyline story and then do so periodically throughout this exercise.
Creating a place for the user to log in.
- On the first slide, create two text entry fields and two labels that say Full Name: and email address:
- Text Entry fields can be created by selecting Insert > Input > Text Entry Field > then dragging the cross hairs across the screen to form the actual element.
- Labels can be created by selecting Insert > Text Box.
- Optional step: Instead of leaving the default text in the Text Entry Fields, I changed it to read "Enter full name" and "Enter email address."
Giving the text entry boxes logical variable names
- Click on the first text entry field (the one for Full Name).
- In the Triggers panel click the "Manage Project Variables" button.
- Click on the variable that is named TextEntry then click on the Edit button at the bottom of the screen.
- Give it a new variable name of "fullName" and click on OK. It is important that you spell it like I have it here since the code that you copy and paste later references the variable with this spelling and case.
- Do the same with the variable named "Text Entry Field1" and give it a new name of "emailAddr" and click OK.
- Next, click OK to leave the Variables window.
Creating a Next Slide button
- Remaining on the first slide and place a button by selecting Insert > Button > pick a button then drag it out across the screen.
- With the button selected, type Next.
This button will do two things. It will send a statement via javascript and xAPI and it will move the user to the next page.
- With the button still selected, select Add Trigger from the Triggers panel. This displays the "Trigger Wizard" dialog box.
- For Action, select "Execute Javascript."
- Next, click the elipses next to the word "Script."
- Paste this code in the Javascript window that appears.
- Click OK to get out of the Javascript window, then click OK again to leave the Trigger Wizard window.
- With the button still selected, select the "Create a new trigger" button.
- Set Action to "Jump to slide."
- Set Slide to next slide then click OK.
- Copy the button and paste it onto slide 2.
- Select the button on slide 2 and in the Triggers panel, double-click Execute Javascript.
- Click the Ellipses.
- Half way down the screen, change 'slide 2' to 'slide 3' then click OK > OK.
- This button will now send a statement that says that the user is moving on to slide 3.
Publishing the Storyline story
- Click the Home tab then click the Publish button then Web.
- Select a folder on your computer that will hold the web files and select Publish. (No need to change or set anything dealing with LMS's or tin can).
- When the "Congratulations" screen appears, click Close. (We don't need no stinkin' Congratulations window).
Tweaks
- In your favorite HTML editor, open one of these files called story_html5.html.
- Copy and paste this code somewhere in the head tag area. (I placed mine below another script src tag).
<script src="xapiwrapper.min.js"></script>
- Re-save the story_html5.html file.
- Copy the file xapiwrapper.min.js into the same folder with all the other web related files. This is a special file for sending xAPI statement and can be found here in the Dist folder.
Testing it out
- Find story_html5.html and double click on it to start the app.
- Enter a full name (which consists of first and last name, example: Mary Smith).
- Enter a correctly formatted email address (example: mary.smith@abc.com).
- Click the Next button. This sends a statement then moves to the next slide.
- Click the Next button again. By now, your little app should've sent two statements.
- Go to the ADL Public Viewer to see if they are shown there.
John Menken is a learning professional excited about the boundless possibilities with xAPI. Email John if you would like to talk more about xAPI and what it could mean for your business.
















