Flash Commands with Lectora

Awesome list Greg! Just a note for everyone. Flash player 10 has some added security "features" and for some reason if you try to grab a lectora variable and assign it to a variable in flash it will come back as undefined. So this call will fail:var tempVariable = ExternalInterface.call("Varvariablename.getValue()"); Even though it works great in flash players 8 and 9, as soon as someone upgrades to 10 that call will no longer work. Unless Adobe come out with an update for it.For now I've been working around it by adding an external HTML object to the page with a javascript function to set my flash variables. For example if in flash I had a variable called "setFromLectora" and I wanted to set it equal to a Lectora variable called "lectoraVariable" I would need external html that looked like:

Code:

What this does is creates a javascript variable called lectoraVariable and sets it to the Lectora variable of the same name. Then it uses javascript to set that variable in the flash movie. swfanim2153 is the Lectora generated name of your flash movie. So inside of flash you would have something like:

Code:

var setFromLectora;ExternalInterface.call("setVars");

Anyhow, hopefully this will save a few headaches when your clients call and want to know why things stopped working when they upgraded to flash player 10.

Discussions have been disabled for this post