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?
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.
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.
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)
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)
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.
11 Replies
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.
I have been trying to do this but have had no success....any further advice? I have been testing exclusively on Firefox.
-Marc Lee
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.
Hey Steve,
I use the following code
var player=parent.GetPlayer();
player.SetVar("show",1);
It really work in Firefox and IE but it doesn't work in Chrome. Let me know how to fit the chrome and how to do to work in chrome.
If you have the way, tell me please!
Hi Steve,
Now I use the following code
var player=parent.GetPlayer();
player.SetVar("show",1);
It doesn't work in chrome. Do you have the way to solve this problem
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)
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)
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
Hi there Paul, thanks for your post! If you don't hear back from folks in this thread, you can always contact them directly via their ELH Profile.
Hi Paul, did you ever get a resolution to this problem?
Hi Chris,
No not really. Manually disabling the security restrictions seems to be the only way. Not really convenient, I know.
This discussion is closed. You can start a new discussion or contact Articulate Support.