Forum Discussion
Example files: Generating a certificate from Storyline
This example demonstrates how you can take user input and generate a certificate for printing. Any Storyline variable or score can be used to generate the output. The file and file add-ins are both simple and straight forward. This will only work in the Flash based output. This will not work in the iOS output or HTML5.
To replicate this on your end:
1) Modify the story file to your liking.
2) Extract the add-in zip file above (certificate.html and certificateBG.gif)
3) Copy these two files into your published output directory. You'll need to do this each time you publish.
This is a really basic example. You really can do quite a bit with this including adding a print button, extra fields, collecting values from the LMS like the user's first and last name.
** I noticed a bug when playing with this file setup. I initially thought I would be able to include the certificate files as resources to avoid copy / paste surgery after publish. Unfortunately, Storyline mangled the HTML file on publish. Will be submitting this as a bug.
- SteveFlowersCommunity Member
Wacky. What do you see when you hit CTRL-P with the certificate window focused? Is it printing without the background? I'm getting it to print from Chrome, IE7, and Firefox.
- DaveFulleCommunity Member
well now I can get your new one to print (and obviously I see the name "test") but I couldn't get the original to print the background and I can't get my background that I put in to print. So now I'm grabbing your new version to see what the deal is.
- SteveFlowersCommunity Member
There may be differences in the way the original (first version) works. If it fills the DIV from CSS as a background attribute, it won't print that unless you specifically configure the browser to print backgrounds.
- DaveFulleCommunity Member
So I did get everything to work now. I had to go into your HTML file, change learner name get VAR from "learner" to "TextEntry7" and also change the file name of the graphic from "certificateBG.gif" to "CertificateBG.gif" to match what the HTML file was calling. After doing that, the name was called in properly, the background displayed, and everything printed!
- SteveFlowersCommunity Member
Cool! Hand editing is touchy Everything needs to line up.
- asifrajaCommunity Member
thanks Steve, just so im clear you cant print certificates if stroyline beig accesses on a local machine.
- SteveFlowersCommunity Member
Hi, Asif -
You can but you'll need to ensure the Flash security sandbox is allowed for your local working directory/directories.
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
If your local directory isn't specifically added, the Flash player won't allow interactions between the Flash movie and the browser.
- asifrajaCommunity Member
Steve
where or what is the publish output directory?
- asifrajaCommunity Member
ok i'm a bit dense but can some one explain step 3 to me.
1) Modify the story file to your liking.
2) Extract the add-in zip file above (certificate.html and certificateBG.gif)
3) Copy these two files into your published output directory. You'll need to do this each time you publish.
- asifrajaCommunity Member
steve please ignore my previous request or anyone for that matter.
what im struggling on is to get their name and result data displaying. any help will be appeciated as i dont have much hair left.