Forum Discussion

TracyCowan's avatar
TracyCowan
Community Member
13 days ago

Using Dev Tools with Storyline

Howdy, I am trying to determine what the storyline variables using Dev Tools. I have tried var player = GetPlayer(); and I get an error "GetPlayer is not defined". I try window.GetPlayer(); and I get "window.GetPlayer is not a function". I have javascript working fine inside storyline but just want to pull variables at different times in course and don't want to add debug text in the course. I have a course that opens another storyline course and when I use Dev Tools on the other course and the window.GetPlayer() works perfect. Why can I not connect with the parent course?

What am I doing wrong. Please help.

  • Hi Tracy - it's possible that your DevTools console "JavaScript context" is in the wrong window.

    At the top of most Consoles, there's a dropdown where you can select the context of the window you want to interact with, and especially when working with embeds, sometimes you have to manually switch to the window containing your project (look for story.html).

    Typically, if you right-click > Inspect pages the console will take you to the proper context. But since most of the Storyline stage disables right-click, you often have to manually select it; either through the dropdown, or the element inspector where you can then select your Storyline stage which switches to that context.

    This may not be the issue, but it's a common one for me.

  • Hi Tracy - it's possible that your DevTools console "JavaScript context" is in the wrong window.

    At the top of most Consoles, there's a dropdown where you can select the context of the window you want to interact with, and especially when working with embeds, sometimes you have to manually switch to the window containing your project (look for story.html).

    Typically, if you right-click > Inspect pages the console will take you to the proper context. But since most of the Storyline stage disables right-click, you often have to manually select it; either through the dropdown, or the element inspector where you can then select your Storyline stage which switches to that context.

    This may not be the issue, but it's a common one for me.

    • TracyCowan's avatar
      TracyCowan
      Community Member

      Thank you so much. That worked. I was in the wrong window.