I use an xml document to load external values into a project. The xml document can be created/edited using a text editor like notepad.
For example, I have a file called values.xml and I place this file in the root of the published output. Inside the file, it has:
<?xml version="1.0" encoding="utf-8"?> <store> <db value="This is value 1"></db> <db value="This is value 2"></db> <db value="This is value 3"></db> </store>
Then using a javascript trigger, I get these values from the xml document.
I have attached a sample xml document and a storyline project for you to take a look at.
Browser security usually blocks local reading of xml documents, so you will need to upload it to see it work.
Thanks a lot! The principle is exactly what I need but unfortunately I can't open your SL file (a warning is displayed, "this project uses functionalities not available in this SL version ..."), I don't understand, my update from SL2 to SL3 is very recent ... Does your files comes from SL360? Maybe it's the reason, I don't know ... Can you tell me ?
I've tried and it's OK with the last SL3 update, the projet is displayed in HTML5 but the values are not loaded ... I have put the XML file in the same folder just near the story_html5.html file. Have I something to do more please??? Your name seems to be french, no? I am french and in Paris ;) so if this discussion can be continued in french it would be so well ! En bref, ce serait top! ;)))
Yes, the values.xml is in the same path along with story_html5.html I have tested Russell Killips' file and it is working on my end. By the way, you need to upload this into your SERVER as this will not work during preview, or local computer.
7 Replies
Hi Serge,
That sounds a bit advanced and out of our support window, but hopefully, someone in the community will be able to chime in and help you out here.
JavaScript is what comes to mind to set the value of those variables, so make sure you check out this small bit of documentation on that.
Hello Serge,
I use an xml document to load external values into a project. The xml document can be created/edited using a text editor like notepad.
For example, I have a file called values.xml and I place this file in the root of the published output. Inside the file, it has:
<?xml version="1.0" encoding="utf-8"?>
<store>
<db value="This is value 1"></db>
<db value="This is value 2"></db>
<db value="This is value 3"></db>
</store>
Then using a javascript trigger, I get these values from the xml document.
I have attached a sample xml document and a storyline project for you to take a look at.
Browser security usually blocks local reading of xml documents, so you will need to upload it to see it work.
Thanks a lot! The principle is exactly what I need but unfortunately I can't open your SL file (a warning is displayed, "this project uses functionalities not available in this SL version ..."), I don't understand, my update from SL2 to SL3 is very recent ... Does your files comes from SL360? Maybe it's the reason, I don't know ... Can you tell me ?
Thanks
Serge
Hi Serge,
Try to update again your SL3 to the latest updates available.
Hi Daniel,
I've tried and it's OK with the last SL3 update, the projet is displayed in HTML5 but the values are not loaded ... I have put the XML file in the same folder just near the story_html5.html file. Have I something to do more please???
Your name seems to be french, no? I am french and in Paris ;) so if this discussion can be continued in french it would be so well ! En bref, ce serait top! ;)))
Hi Serge,
Yes, the values.xml is in the same path along with story_html5.html
I have tested Russell Killips' file and it is working on my end.
By the way, you need to upload this into your SERVER as this will not work during preview, or local computer.
Sorry, of course it works very well online! ;))))
Thanks a lot for your help!!!
Bye
Serge
This discussion is closed. You can start a new discussion or contact Articulate Support.