Hiding an item in Flash with a Lectora button.
March 27, 2013 12:00 AM
Gang,
Thanks for the help on getting Flash to talk to Lectora. I've got that working.
I'm now trying to hide a lesson transcript box in Flash with a button in Lectora. I've tried using the ExternaInterface GetValue and even trying using JS to run a Function with the ExternalInterface addCallback, but it's not working.
I'm using Lectora v11 and Flash CS6 with AS3.
Any help would be appreciated. I'm a Multimedia Designer not a programmer so coding isn't my strongest suit.
~Ramona
Discussion (6)
The problem is that you must add callback in Flash only after the DOM is fully loaded. So you have to check for whether the page is fully loaded before adding the callback in Flash.
Here's a very detailed example from Adobe: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cb1.html
Here's a working sample from me: https://dl.dropbox.com/u/11433463/trivantis/ext-int/lectora/html/index.html
Here's the source for my sample (Lectora and Flash included): https://dl.dropbox.com/u/11433463/trivantis/ext-int/lectora/lectora-by-www.intea.lv.zip
I have a function in Flash that works with a Flash button call ShowTranscript.
My flash code for the ExternalInterface.addCallback is:
ExternalInterface.addCallback("transcriptFunction", ShowTranscript);
My Lectora onMouseClick:
Flash Command
Target: lectoria_test
Command: Call Function
Command Settings: Name: transcriptFunction Value: 0
Flash isn't giving me an error when I publish it. Once publish, the Lectora button that I have the Function Call on does nothing.
I did try the Command Setting Value as Null (since you can't have it blank) and Flash didn't like that when it was ran within the published HTML.
~Ramona
1. Please show your code both in JS and AS.
2. Please explain 'not working' in more detail, e.g. does it produce any errors in JS and/or AS?
Thanks Ssneg,
I owe you one! Works GREAT!!!
~Ramona
Ssneg,
Something we have to do with our product is make an .exe. Our previous version used SABA publisher and we were using an 3party HTML to EXE program to make our .exe. When we try that now, page number are not coming up. So I thought I would try making the .exe in Lectora. It won’t let External HTML Objects be published in an .exe. Any ideas?
Thanks, Ramona
Discussions have been disabled for this post