Slide Title as Variable

I am wondering if it is possible to add the slide title as a text variable to slides. I have used the screen capture mode, changed the slide titles to make them more descriptive, and would like to use these slide titles in the caption boxes for my slides. Is it possible to add a %SlideTitle% variable, or something like it, to each one? Thanks.  

43 Replies
Ashley Terwilliger-Pollard

Thanks Ramesh for sharing those here - and I unfortunately don't have any additional information to offer in regards to where those features may be in terms of a priority or product road map for inclusion, but the best course of action is to share the thoughts here in the forums to see if other users  have suggestions for ways you could accomplish this and than to share your thoughts directly with our product development team. 

Hope you're enjoying the other new features of Update 5. 

Mr Petrichor

this looks very promising!  could you show a little more of the context for this?  how do you defined "story" and "player" ?


I'm trying to get info, and using

    var myPlayer = GetPlayer()


only seems to return width, height, align, data, type, and tabindex.


how is "story" defined?

how is "player" defined?


thanks in advance



Ashley Terwilliger-Pollard

Hi Mr. Petrichor,

I'm not sure if Ramesh is still subscribed to this thread but you may want to message him using the "contact me" button on his profile to see if he's able to share additional ideas and thoughts with you on this set up. Javascript triggers are not something that I'm equipped to assist with, so I'll have to defer to the community. 

Mr Petrichor

Thank you very much for your response. I will try to get in contact with

Are there other resources, such as 3rd party books, or other websites with
that sort of information? We are trying to use Storyline, but we do not
have the benefit of an LMS or SCORM, so tracking anything is daunting. If
you could point me in the direction of other info sources it would be
greatly appreciated. Even if I could snag a variable, or a textbox value
on the screen from javascript would be a great improvement.

Thanks again
Mr. P

Ashley Terwilliger-Pollard

Hi Mr. P, 

I don't know much in the way of other sites or books that would have there, but there are certainly folks in the forums who gather information such as text variable and report it using Javascript. Have you seen the Javascript best practices here? It's not something I can assist with as I mentioned, but it may be worth starting a new thread with details about your requirements and what you're looking to capture and report back. 

Kyle Swaim
Ramesh Yadav


I'm using update 8 and for html5 output you can get the slide title like below using JavaScript.

curslide = story.allSlides[player.slideIndex].title;

Hi Everyone,

I was wondering if anyone has found a way to use the above code that Ramesh has posted (or other code) to produce the slide title without having to view in HTML 5? We are hoping to use this to enhance our review process but really do not want to have to review in HTML5.


Mr Petrichor

I am very eager to see an answer on this subject as well. I sent Ramesh an
e-mail directly, but have gotten no response. We are trying to use
Storyline without a "bona fide" LMS and haven't really had any success in
keeping track of the user's progress. kinda frustrating. This code would
very helpful.

Sorry I have no assistance to offer you, other than sharing your interest.

Steve Flowers

The mechanics of the player differ between HTML5 and Flash outputs. HTML5 makes that element accessible by nature of the way it's built. Flash isn't quite so easy. To extract the title in Flash, you'd likely need to write some Actionscript 3, and compile a custom swf for import that reached into the player hierarchy and extracted this value. It's not going to be simple, unfortunately;)

Mr Petrichor

are there any examples, either way (HTML5 or Flash) ?  I  would to see a 2 slide example that uses any methodology to get some info.  although ... flash does not seem like a viable path forward.

if I put

curslide = story.allSlides[player.slideIndex].title;

into a javascript snippet, it won't work because none of that stuff is defined.  Is there anyway to get a working example of this code?  

we do not have a scorm lms... and we need to figure out some kind of workaround.


Mr Petrichor

maybe the question I should be asking is - where would I look to find out how to extract info that exists in the storyline scorm or aicc outputs so we could parse this data manually, outside of storyline?  Is there information out there anywhere that explains how to parse that data?

thanks again.

Kyle Swaim

Hi Mr. Petrichor,

I was able to get Storyline to change a variable to the current slide title (in HTML5) using this JavaScript:

var player = GetPlayer();

Then whenever you reference %CurrentSlide% it will display the current slide title.

However, getting this data outside of Storyline is beyond me.

Hope this helps!

Steve Flowers

As Kyle illustrates, you don't need an LMS to grab the title in HTML5.

var curslide = story.allSlides[player.slideIndex].title;

This will populate a JS variable with the title. But you'll need to do something with it. Maybe a detailed description of what you're trying to accomplish, such as where you want to send the title, will help?

var player=GetPlayer(); works in Flash and in HTML5. It sets an object reference to the player. In Flash, there are only a couple of things you can do with the player object:

player.SetVar("StorylineVariableName","VALUE YOU WANT TO INSERT");

Sets a variable in Storyline from Javascript.

var myJSVar=player.GetVar("StorylineVariableName");

Gets a variable value from Storyline and sets a JS variable to the value.

In HTML5, there's a story object. That's what you're seeing above with story.allSlides... player.slideIndex retrieves the index for the current slide. allSlides[index] retrieves a collection of properties. allSlides[index].title grabs the title from the collection.

Open up the console in Chrome (or your favorite modern browser) with a Storyline HTML5 output running. Type in story. and you'll see a list of stuff that you have access to. 

Mr Petrichor

Thank you for your response - I know I don't need an LMS to get the title
in HTML 5, but it seems I do need to have an LMS to resume a course on a
different computer. I was (probably erroneously) going down a path where
I'd build a list of titles in a course so that I could capture where the
user left off when taking the course.

then, via javascript I could call some code that would save that
information to a database (not a scorm LMS) so that when the user returned,
somehow I could navigate to the page identified by the title, or some other
variable I could have access to.

Just how to actually navigate to that page was the next step in my...
arduous... journey...

Thanks again for your response, and hope you can help me down the road!

Steve Flowers

Ah. I got you. You should be able to store player.slideIndex in your database and retrieve that.


  • Use Never Resume so that your story always starts on the first page.
  • Place your restore index in a querystring value http://yoursite/story.html?bookmark=INDEX
  • Setup a JS trigger to retrieve the querystring value 
  • Explore the HTML5 output a bit to find the navigation function. You should be able to use the index value to jump right to the page where folks left off.
Mr Petrichor

Steve - Thank you so much for this - this is excellent.    I viewed your comments from a while ago on internal bookmarking in my quest to navigate to the saved page. (


There's a very interesting snippet there:

var player=GetPlayer();
var addr =;

I'm getting the feeling that to implement this code there has to be a collection of triggers on the master slide, basically saying - (pseudo code)

   if leap== Equal to 5 jump to slide 1.1.1

and another that says

  if leap== Equal to 6 jump to slide 1.1.2


am I on the right track?


and if I have 55 slides, and I want to track where the user left off on any of those slides, I would have to create 55 triggers, hard wired to each one?


so... 2 questions: it seems like the slide index of my first slide is 5 (odd, but whatever).  Is that constant? will they always start on 5, and increment sequentially?

2- what happens when I have my 55 triggers set up, good to go, and someone adds in a slide after slide 33?  Do I have to edit each trigger from 34 on?



thanks again, your help has been invaluable.



Mr Petrichor

Thanks again for all your help. Sorry I'm bumbling around here!

even with my concept in place, it doesn't seem to work as expected, and I'm
sure it's my unfamiliarity with Storyline, the order of events, etc. (I'm
not ISD, I'm just the guy trying to wire it up to the database)

I'm getting "too much recursion" errors in the console (firefox).

In my master slide timeline I set up my "when variable changes" triggers
for "if leap == 1 jump to ....", "if leap ==2 jump to ...." etc.

In the master, or even in the first slide, on "timeline start" I set a
trigger for when timeline starts that gets:
var player = GetPlayer()
addr =

I even tried doing a player.SetVar("leap",0) as the very first script to
run, to ensure that there was "change", and that it only occurred once..

(resume is disabled from the player:options tab)

but .... in the firefox console... I get the error ... too much recursion.

I don't know what is recursing; my presumption is that the placement of
events on timeline start is not a good thing. also it seems like it would
beneficial to delete the variable onChange listener after its use.

I did notice in the player object in the console there is a method
and that indeed, doing a "player.setSlideIndex(7)" DOES move the navigation
on the left side, the table of contents, to the correct slide, I just don't
see how to actually trigger the load event, and cause the slide to be

Again, thank you very much... seems so close.