Changing slide from javascript and getting the current one

Dec 02, 2013

Hello, I'm building a QA tool for our storyline courses, so our clients can leave comments about the content. this would make it easier for us to have all our data in the same place instead of emails, word/powerpoint documents, ...

Anyway, if the client want something to be changed on the forth slide, the QA tool needs to know where we are so I can save the comment for the correct page.

What I'm currently doing is creating a trigger that execute javascript when the timeline starts that call something like you_are_here("1.1"); and you_are_here("1.2"); on the 2nd page. While it's easy and quick to do, we have some huge courses coming in production and copy/pasting the everywhere while changing the page number will be error prone. I found out about the master slide and that I can create a single trigger that will be magically duplicated for every slides. But then it would always be page 1.1. I thought of coding a little post publish script that would edit user.js with the slide id from data found in frame.xml <slidelink>. A bit weird, but it would work.

A new function in the API would help greatly. GetPlayer().GetCurrentSlideId() would be really nice. Weather it returns a human readable number like we can see in Storyline (1.1) or the slide id (6kZ2v9SE13v or _player.6WJvPWsb3tP.6kZ2v9SE13v).

My second problem, I need to change slide via javascript. What I'm currently doing is on the first slide I create a jump to slide trigger when a variable change to "1.1", then I duplicate it to slide 1 again while changing the slide and the variable target to "1.2". Repeat for each slide in the project. Then in javascript, I call GetPlayer().SetVar("current_page", "3.27"); Again it works well for small projects, but for big ones, we're going to spend as mush time creating all these triggers than the actual content. I need to test this in the master slide tomorrow.

Exposing a new function to the API like JumpToSlide("3.27") or JumpToSlide("_player.6WJvPWsb3tP.6kZ2v9SE13v") would be super great. Maybe add an option in the publish dialog to enable it or not.

Would a change in your API be something that would be doable ? If not is there a better way to achieve what I'm doing?

Thank you.

Guillaume

PS: Storyline is an awesome software that is great to work with!

5 Replies
Jedidiah Esposito

I need this pretty badly as well and will be filling out a feature request. 

I don't need to number slides per se, but I do need to be able to throw something on the slide master that will show a slide identifier on each slide of the project. 

We're dealing with a ton of content reviewers who aren't always great at providing specific feedback. It would be *really* nice for them to be able to point to a specific slide. 

Ashley Terwilliger-Pollard

Hi Jedidiah,

Guillaume's request seems to be a bit different than yours in that he is looking to set up some Javascript based on tracking slide variables. 

If you're looking to include slide identifiers, you may want to enable the numbering within a menu, and if you share the published version with your content reviewers they'd be able to refer to that number as shown here:

 Here is a thread that describes how to add a slide number based on variables, and again to see the variable they'll need to view a published version. 

Jedidiah Esposito

Hi Ashley,
Thanks for the tip. I saw the thread you referenced once before and have considered doing that. I'd like to (lazy me) get away without having to add something to every slide in a project, though, if possible.

Your tip about enabling numbering in the slide menu is a good one. We don't use the built in player menu in our courses, but it may be worth re-enabling it during the testing phase as a work around. I don't know why I didn't think of that. haha

I do think it would be handy, down the road, to be able to slap a %MenuNumber% token on a master slide that will simply display the numbers that the menu is using (1.1, etc..)

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