i have assign value to variable using java script like
var player = GetPlayer(); var Password= player.GetVar("TextEntry"); var numChars= Password.length; player.SetVar("passwordLength",numChars);
the value has assign but it doesn't display.for example i have assign 0 to passwordlength when i creating this variable, but i have to give five characters in TextEntry box the passwordlength will be displayed 0 after execute javascript code.
Your script works for me, see a quick test here. I would first verify that the textentry variable is actually populated with the entered text, before the JavaScript is executed.
I'm using Update 5. Are you testing locally? In this case, the script may be blocked by FlashPlayer security settings. Try publishing to CD or upload the published content to some server and then test.
6 Replies
Your script works for me, see a quick test here. I would first verify that the textentry variable is actually populated with the entered text, before the JavaScript is executed.
Hi Michael
Thanks for your quick replay.will you please share your story file
See attached my test file, I used your script as is.
Thank you so much mr michael.but didn't work till now , which version you have to use? storyline Update5 or previous version
I'm using Update 5. Are you testing locally? In this case, the script may be blocked by FlashPlayer security settings. Try publishing to CD or upload the published content to some server and then test.
Hi Michael
It was working server thanks for sharing this information
This discussion is closed. You can start a new discussion or contact Articulate Support.