Accessing Storyline variables from an embedded web object

Jan 24, 2014

Hello all!

I'm planning a page that will have timeline strips placed in it as graphic elements - which will allow me to place them so that TODAY is in the middle of the visible window.

It would be ideal if I can use js in the embedded object to address storyline variables. Using  GetPlayer();  (or parent.GetPlayer()  )within the object doesn't seem to work. Has anyone managed to do this?

Cheers, Adam

11 Replies
Steve Flowers

Hi Adam,

Yep. I've managed to get to the variables from a Web object. It doesn't work well locally for a variety of reasons. Chrome has fits with some configurations, Flash player sandbox, etc..

Here's pseudo how I do it:

var player=parent.GetPlayer();

var jsVar="VALUE TO SEND";

player.SetVar("storylineVar", jsVar);

var jsInput=player.GetVar("storylineVar");

alert(jsInput);

You are on the right track. Test other than locally or test within the CD Publish wrapper.

Sandeep Gill

Steve Flowers said:

Hey Marc -

When testing, do you upload to a host or test locally? The Flash player restricts interaction between the browser and the player by default when run locally. One way around this is to update the player security whitelist. Another is to publish to CD or publish and run from a web host.


As suggested by Steve,

For it to work on all browsers, it has to be on a webserver, either local or with a host. With some versions of IE and Firefox, it does work locally but, for chrome it has to be on a web server.

Just tested it on: Chrome Version 38.0.2121.3 canary (64-bit)

Paul Wijnen

Hi all,

I'm trying to get "parent.getPlayer()" to work in Chrome locally (offline).
I'm not sure if this thread is still alive, but do you guys think this Chrome plugin might or should help? My first attempt was without a succes, but I think the cross origin warning indicates it has something to do with this.

https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi/related?hl=en

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