Magic Multimedia Lesson
This superpower allows you to control the complete and continue button from your Storyline code
In order to use this, you must understand how to call a Javascript function from within your authoring tool (Storyline, etc). Please do not contact support for instructions on how to do this from within your tool. What is being provided here is a way for your multimedia lesson html to be able to issue a Javascript message to a snippet of code from plaYEAH! that will be listening for certain messages to perform operations like hiding or clicking the complete and continue button.

Step 1: Place the JavaScript into your .story file

1) Open your .story file to the slide that has the button you want to activate the JavaScript code and select the button. You must use a button to activate the JavaScript
2) In the Triggers panel, create a new trigger.
3) Choose Execute JavaScript in the JavaScript popup window and choose your button (if it isn’t already chosen.)
Click on the JavaScript link that appears in the box and copy/paste the following (this will turn off the “Complete” button):
1
window.parent.postMessage('hide_complete', '*');
Copied!
4) Save your trigger and move it above any other triggers for the button that already exist.
5) Save your slide.
6) Open the slide that contains the button you want to use to turn the “Complete” button back on. Repeat the process, but this time the JavaScript you will use is:
1
window.parent.postMessage('show_complete', '*');
Copied!

Step 2: Place JavaScript into your story.html file

1) Export your Storyline document for Web by clicking Publish > Web. Find your exported files. Within the exported files folder that is created you will see a story.html file. Open this file using a text editor. I use Atom, but here is a list you might want to choose from.
Do not use MS Word or any other kind of word processing program: Sublime Text Atom Notepad++ CoffeeCup – The HTML Editor TextMate Vim UltraEdit Coda BBEdit Komodo Edit Visual Studio Code Brackets CodeShare
Once you have your story.html open, copy/paste the following code after and before at the top of the file. Save your file.
1
<script>
2
3
function hide_cc() {
4
/* hide thinkific course player complete and continue button*/
5
window.parent.postMessage('hide_complete', '*');
6
}
7
function show_cc() {
8
/* show thinkific course player complete and continue button*/
9
window.parent.postMessage('show_complete', '*');
10
}
11
function click_cc() {
12
/* click thinkific course player complete and continue button*/
13
window.parent.postMessage('click_complete', '*');
14
}
15
function click_ic() {
16
/* click thinkific course player mark incomplete button*/
17
window.parent.postMessage('click_incomplete', '*');
18
}
19
function hide_tcp() {
20
/* hide thinkific course player sidenav */
21
window.parent.postMessage('hide_tcp_chapters', '*');
22
}
23
function show_tcp() {
24
/* shows thinkific course player sidenav */
25
window.parent.postMessage('show_tcp_chapters', '*');
26
}
27
28
</script>
Copied!
This code should go before any other JavaScript code that you might see, but after </style>. For Example:

Step 3: Zip all of the files you will need for uploading to Thinkific

  1. 1.
    Log into your Thinkific account.
  2. 2.
    In the left sidebar, click on “Settings” In the panel that appears, choose the tab that says “Code & Analytics”
  3. 3.
    Copy/paste the following code into the footer and choose
  4. 4.
    Save
1
<!-- plaYEAH! Magic Multimedia Lesson --><script src="https://cdn.jsdelivr.net/gh/robgalvinco/[email protected]/playeah/event-manager.min.js"></script>
2
Copied!