I just downloaded a trail version Storylineand tried the JavaScript example as described in "JavaScript best practices and examples" at http://www.articulate.com/support/kb_article.php?product=st1&id=llwes8cn32vg . Why this example does not work? I really need JavaScript in Storyline to implement a free-run simulator (very difficult to use interactions). If someone can provide an working example (.story) for "Execute JavaScript" trigger, that will be greatly appreciate.
I really appreciate your quick response to my question.
I tried your example, if I only publish to WEB (no HTML 5 and mobile device), storyline generate story.html and I double click story.html to bring it up in IE or Chrome, the JavaScript does not work. If I check the "Include HTML 5 output", Storyline generates both story.html and story_html5.html. I double click story_html5.html to bring it up in Chrome, the JavaScript worked, but in IE, it says unsupported browser. And story.html still does not work. See the attached PublishAsWebOnly.jpg and PublishAsWebAndHtml5.jpg to see how I published, and story_html.jpg for story.html screenshot with flash player version information, story_html5_html.jpg for HTML 5 screenshot.
I just installed a new Windows 7 machine and installed the latest flash player(Adobe Flash Player 11 ActiveX). Is my flash player different from yours?
JavaScript is very critical for my project (with dynamic simulator) to use Storyline. Any help and information will be greatly appreciated!
Note: here only allow one attachment, I put all screenshots in one MS Word .doc file
If you view published Storyline content on your local hard drive or send it to someone else to view on their local hard drive, you'll encounter security restrictions from the computer, web browser, Flash Player, and network that'll cause various features of your content to fail.
To properly test your published content and share it with others, upload it to the environment for which it was published as described in this article.
Please let us know if you need anything else. Thanks!
Millions of thanks to you! It worked after I uploaded the published contents to tempshare.
One more question: my simulator need to use LED true type fonts. Is there a way bind the true type fonts with the published contents so that users (other people browse the course) will not need to install the LED true type fonts on their machine?
I still could not get the custom fonts working on other machines other than my machine installed the LCD and LED true type fonts. Please click this link http://s3.amazonaws.com/tempshare-stage.storyline.articulate.com/stp182cj23jh1s8i7p11f8ru7bc4/story.html to see if you can get the same LCD and LED fonts displayed as the same shown in the attached screenshot. I click this same link will get the LCD and LED fonts displayed correctly.
No, I could not see the fonts as you intended. So, we knew that custom fonts were not supported for variable references in HTML5 output, but the fact that it fails in flash is a new find.
It has been reported to QA to look into and I will track it and keep you posted. I cannot, however, offer a timeline or workaround at this time.
In storyline, is there a way to detect if a custom font installed on the client machine? if not, install the font automatically since I have the true type font .ttf file just like if flash is not installed, it will prompt client to install flash.
Does Storyline support JavaScript for LMS/SCORM2004? I can get JavaScript work beautifully in WEB and CD mode, but not in LMS mode.
After I published my Storyline course in LMS mode(SCORM 2004 3rd), I added under the resource tag group, and also updated the story.html file the same way as in WEB mode by adding right before , and then zipped the directory, uploaded to SCORM system. Do I miss anything here to get JavaScript work in SCORM?
Forget my previous post. I got JavaScript working in LMS/SCORM2004 3rd edition. my .js file has to be put before the user.js file in the story.html. The order makes different.
Other than the custom font issue, I am ready to do my project with Storyline. Thanks for all your help.
I'm with the original post, Shawn Wang downloading the example and it not working as story.html, and only as story_html5. I would like to use the story.html and *not* the story_html5 file.
I notice however that Internet Explorer 11 is the only browser that can read story.html's javascript. Firefox, Chrome, and Safari all fail. Very strange indeed.
How can I get a published story.html to execute javascript? Is that even possible?
I did go to that link, and study thoroughly all the different export options, and none of those worked.
Here is a working example of a .story project file, and here is the resulting output.
Please let us know if you have any other trouble, and have a great day!
Justin, i too have a similar issue. I've been trying to implement a javascript trigger, with no results. I dumped everything and tried a hello world sample via the alert function, but nothing. I've tried running your resulting javascript_example link and every browser comes back with the "unknown" string instead of the date. I've tried FF, Chrome and IE.
Three colleagues and I just tested this example in Chrome, IE, and Firefox. It worked flawlessly for all four of us in all three browsers. Are you trying the same example, or are you downloading my .story project file and publishing/testing it?
If this example fails for you in all three browsers, you might try a JavaScript tester to see if JavaScript is working at all in any of your browsers, and seek help from your friendly local IT pro if it is not.
I've run the java script tester you included, and "javascript is WORKING" in all three browsers, and your first bullet link is producing the "Unknown" result as you can see below.
I must have some configuration issue with my machine.
No questions are silly. and yes been clicking. But....
I've rebooted my machine and all works correctly now. Thank you very much Microsoft. I broke rule #1 in troubleshooting. Always always stay with your wing man. Then hit Ctrl-Alt-Del.
19 Replies
Good Morning Shawn, and welcome to Heroes!
I'm not having any trouble with the first example within the article you referenced. Did you try following Brian's Screenr Tutorial?
Here is a working example of a .story project file, and here is the resulting output.
Please let us know if you have any other trouble, and have a great day!
Hi Justin,
I really appreciate your quick response to my question.
I tried your example, if I only publish to WEB (no HTML 5 and mobile device), storyline generate story.html and I double click story.html to bring it up in IE or Chrome, the JavaScript does not work. If I check the "Include HTML 5 output", Storyline generates both story.html and story_html5.html. I double click story_html5.html to bring it up in Chrome, the JavaScript worked, but in IE, it says unsupported browser. And story.html still does not work. See the attached PublishAsWebOnly.jpg and PublishAsWebAndHtml5.jpg to see how I published, and story_html.jpg for story.html screenshot with flash player version information, story_html5_html.jpg for HTML 5 screenshot.
I just installed a new Windows 7 machine and installed the latest flash player(Adobe Flash Player 11 ActiveX). Is my flash player different from yours?
JavaScript is very critical for my project (with dynamic simulator) to use Storyline. Any help and information will be greatly appreciated!
Note: here only allow one attachment, I put all screenshots in one MS Word .doc file
Hello again, Shawn.
If you view published Storyline content on your local hard drive or send it to someone else to view on their local hard drive, you'll encounter security restrictions from the computer, web browser, Flash Player, and network that'll cause various features of your content to fail.
To properly test your published content and share it with others, upload it to the environment for which it was published as described in this article.
Please let us know if you need anything else. Thanks!
Justin,
Millions of thanks to you! It worked after I uploaded the published contents to tempshare.
One more question: my simulator need to use LED true type fonts. Is there a way bind the true type fonts with the published contents so that users (other people browse the course) will not need to install the LED true type fonts on their machine?
Hi Shawn! Glad to hear that you got that working.
Now, on to your next question:
Your learners should not have any problems viewing your custom fonts once it is in its published output.
Leslie,
I still could not get the custom fonts working on other machines other than my machine installed the LCD and LED true type fonts. Please click this link http://s3.amazonaws.com/tempshare-stage.storyline.articulate.com/stp182cj23jh1s8i7p11f8ru7bc4/story.html to see if you can get the same LCD and LED fonts displayed as the same shown in the attached screenshot. I click this same link will get the LCD and LED fonts displayed correctly.
Thanks,
Shawn
Hi Shawn!
No, I could not see the fonts as you intended. So, we knew that custom fonts were not supported for variable references in HTML5 output, but the fact that it fails in flash is a new find.
It has been reported to QA to look into and I will track it and keep you posted. I cannot, however, offer a timeline or workaround at this time.
Thanks.
Hi Leslie,
In storyline, is there a way to detect if a custom font installed on the client machine? if not, install the font automatically since I have the true type font .ttf file just like if flash is not installed, it will prompt client to install flash.
Thanks,
Shawn
I'm sorry Shawn, but there is not a way to do this utilizing Storyline.
Hi Leslie and Justin,
Does Storyline support JavaScript for LMS/SCORM2004? I can get JavaScript work beautifully in WEB and CD mode, but not in LMS mode.
After I published my Storyline course in LMS mode(SCORM 2004 3rd), I added under the resource tag group, and also updated the story.html file the same way as in WEB mode by adding right before , and then zipped the directory, uploaded to SCORM system. Do I miss anything here to get JavaScript work in SCORM?
Thanks,
Shawn
Leslie and Justin,
Forget my previous post. I got JavaScript working in LMS/SCORM2004 3rd edition. my .js file has to be put before the user.js file in the story.html. The order makes different.
Other than the custom font issue, I am ready to do my project with Storyline. Thanks for all your help.
Shawn
Glad to hear it Shawn! Good luck with your project
I'm with the original post, Shawn Wang downloading the example and it not working as story.html, and only as story_html5. I would like to use the story.html and *not* the story_html5 file.
I notice however that Internet Explorer 11 is the only browser that can read story.html's javascript. Firefox, Chrome, and Safari all fail. Very strange indeed.
How can I get a published story.html to execute javascript? Is that even possible?
I did go to that link, and study thoroughly all the different export options, and none of those worked.
Good Morning, Trip.
Does this example work in Firefox for you? What about in Chrome? What about in Safari?
Justin, i too have a similar issue. I've been trying to implement a javascript trigger, with no results. I dumped everything and tried a hello world sample via the alert function, but nothing. I've tried running your resulting javascript_example link and every browser comes back with the "unknown" string instead of the date. I've tried FF, Chrome and IE.
All have javascript enabled.
Any suggestions on next steps?
Thanks,
Pat
Good Afternoon, Pat.
Three colleagues and I just tested this example in Chrome, IE, and Firefox. It worked flawlessly for all four of us in all three browsers. Are you trying the same example, or are you downloading my .story project file and publishing/testing it?
I've run the java script tester you included, and "javascript is WORKING" in all three browsers, and your first bullet link is producing the "Unknown" result as you can see below.
I must have some configuration issue with my machine.
Thanks for the help.
Pat
Pat,
I'm sorry if this is a silly question, but you did try clicking on the big blue rectangle in that date example, right?
No questions are silly. and yes been clicking. But....
I've rebooted my machine and all works correctly now. Thank you very much Microsoft. I broke rule #1 in troubleshooting. Always always stay with your wing man. Then hit Ctrl-Alt-Del.
This discussion is closed. You can start a new discussion or contact Articulate Support.