pass variables to Flash

turlon
turlon Community Member Posts: 60
I am attempting to pass a lectora variable to the flash front end on each html page of a course. The Lectora variable is set by a flash button click, and then carried over to the subsequent pages. I need the flash movies on these pages to check this variable upon loading, and then play a sub movie if its equal to 1. Im pretty sure to need to pass the variable to flash in some way so I went looking and I found some code in this forum:var yourVariable = new String();getURL ("javascript:window.document.[name of Lectora-published .swf>.SetVariable('yourVariable', LMSGetValue('cmi.suspend_data'))");.....but Im having trouble getting it working. Pardon the following simplistic questions as I dont know JS!- Am I even using the correct code to achieve what I want!?- Does this piece of code get inserted as is, between the HEAD tags on each html page...os somwhere else?-Do I keep the square brackets around the swf name in the actual code? eg. [name of Lectora-published .swf]I also need help with the Flash code side of things, as this is probably not correct either. I placed this actionscript on the first frame of each flash movie/page.javascript:VaryourVariable.getValue();if (yourVariable = "1") {     WAV.gotoAndPlay(2);} else {     stopAllSounds();}stop();Any suggestions on what is wrong with my code and indeed my approach would be greatly appreciated! Edited By: turlon on 2006-3-31 7:26:19
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!