Variables, Triggers and JavaScript...oh my!

Nov 19, 2015

Hello Articulate community! I need to pick your collective brain about an interaction in Storyline 2. I'm a visual designer who is just learning Storyline, and have minimal experience with variables, triggers and JavaScript.

I am creating and interaction that has six parts. The student is supposed to rate themselves in six different areas. Each part is a scale from 1 to 10, so there are 10 possible selections for each area. It's set up as a wheel or pie chart (see attached image). The customer wants those values emailed to them at the end of the module and they want the student to be able to rate themselves in all six areas without having to submit each section or move to the next slide for the next section. I've got the interaction working with the help of some serious OCD tendencies, but I'm not sure how to capture the values.

Now let me tell you how I have it set up...

<OCD>

Because I don't have a lot of experience, I'm sure that I set this up in the most painful, tedious way possible. Each selection is a separate .png. What you see in the example is the empty chart .png plus six different .pngs. One for each of the six areas. I'm using triggers on 60 different hot spots to change the state of the .pngs from Hidden to Normal. I was hoping to have a scale of 1-10 for six parts, but I couldn't figure out how to do a grouping (or array) in Storyline. The other issue is that if the student clicks on 9 in one section, but then decides he really wants to choose 5, I have to turn off 9, 8, 7, and 6. HOLY. MOLY. Each hotspot has 10 triggers. One to change the state of the chosen .png to Normal and 9 that change the state of the other .pngs to hidden. Now that I have carpal tunnel syndrome, it's working physically. All I have to say is thank goodness they didn't have 7+ sections.

</OCD>

What I was hoping to do was leverage the insane amount of work I've already done in combination with JavaScript code (to capture for email) and a series (not 600) variables in Storyline to capture the six levels that the student has chosen.  I have no variables in Storyline yet - just triggers - and I'm a little confused how to make them work together. I was hoping to be able to create an "array" in Storyline (one for each of the six sections), but I don't see a way to create a group. Honestly, if I have to create 600 variables in Storyline, I'm going to cry. Of course, I'll do it, but it will require therapy.

Do any of the guru's out there have suggestions?

Many, many thanks!

13 Replies
Ashley Terwilliger-Pollard

Holy, moly is right Sharon. 60 different hotspots...

I'm unable to assist with the Javascript element, but you may want to begin by reviewing the general best practices here and I'd also suggest sharing your .story file so that our Javascript gurus could take a look at what you've got set up and play around with it to offer ideas. 

Mark Shepherd

Hi Sharon:

Wow, umm, 600 variables for ANYTHING in Storyline seems like way too much.

So far, even in the worst case scenario, I've yet to exceed about 100 or so, even including multiple trigger paths.

My brain is just hurting watching this scenario unfold, but my first random thought/suggestion would be to see if you can break this concept down into more manageable pieces that Storyline can handle and/or display gradually:

IE:

a) Capture the Values from 1-10 using simple Quiz/Interactions (nothing visual or fancy) FIRST

b) Then use the fancy Pie Chart to display the details based on what you capture, NEXT,

c) Not sure about the JavaScript and the e-mailing, that might have to be separated out into a final third piece, LAST.

I will take a closer look at this tomorrow, but for now, I'd say you had BETTER learn to SIMPLIFY your work, somehow, somewhere, and loosen up your design a little.

Please don't take this the wrong way, but if you don't at least try to do this, you might end up doing an AWFUL lot of WORK, which, while looking impressive, may not be as complicated or as onerous as perhaps it could be with some added simplicity.

My .02 cents: Challenge yourself to see if you can do the same thing without so many visuals. 

That might not be possible in this case, but I'm betting you can probably find some ways of decreasing your workload in Storyline.

Hope this helps!

Sincerely,

-Mark

 

Walt Hamilton

Sharon,

Here is the start of a simpler way to do this. It uses states and sliders.

When you are through, you have 6 variables to capture and send. This could be done through a quiz form. The user would not even see the slide, it wouldn't be in the navigation flow. When they click to end this slide, the 6 variables could be transferred by trigger (adjust variable XX to Slider1) to the quiz answers. Then use js or lms to capture the answers.

Alexandros Anoyatis
Sharon Palmatory

I was hoping to be able to create an "array" in Storyline (one for each of the six sections), but I don't see a way to create a group.

The way to achieve this is NOT easy, so be prepared to spend some time working it out but it IS doable. The way to do it is to create an ordinary text variable, and then leverage that by converting it to an array using a JS trigger, and then back to a text variable.

I can't tell you exactly what works in your case, but with a fair bit of programming you can achieve this without a hitch.

I've done something similar to a demo project of mine a couple of years back: https://community.articulate.com/discussions/building-better-courses/demo-menu-toolkit-for-articulate-storyline . This and the demo that explains it all can get you up and running pretty quickly - just isolate the code you are mostly interested in (it's all in masters) and copy that to your project making sure the corresponding variables match.

Good luck!

Hope this helps,
Alex

Sharon  Palmatory

Thank you for your response, Ashley. I'm trying to add my .story file as an attachment, but after I browse and locate the file, the POST REPLY button isn't active. Do I need to .zip it? I don't have a server available to post to.

I've reviewed that thread and have actually modified a JavaScript file that captures the student's notes and gives them the option to print or send to email. Thanks!

Ashley Terwilliger-Pollard

Hi Sharon,

I haven't seen that behavior before with reply in in the forums or sharing attachments. Did you include information within the body of the post too or just trying to upload the attachment? Could you test it in another browser and let me know how it behaves there? Also I could try uploading it for you - if you want to send me the file here. 

Also just as an FYI responding via email includes your signature here and won't upload any attachments. You're welcome to edit the post to remove your signature if needed. 

This discussion is closed. You can start a new discussion or contact Articulate Support.